chore: restore original directory structure (project under code-review-graph-main/)
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
#include "EXTERN.h"
|
||||
#include "perl.h"
|
||||
#include "XSUB.h"
|
||||
#include <string.h>
|
||||
|
||||
typedef struct {
|
||||
int x;
|
||||
int y;
|
||||
} Point;
|
||||
|
||||
static int
|
||||
_add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
static double
|
||||
compute_distance(int x1, int y1, int x2, int y2) {
|
||||
int dx = x2 - x1;
|
||||
int dy = y2 - y1;
|
||||
return _add(dx * dx, dy * dy);
|
||||
}
|
||||
|
||||
MODULE = MyModule PACKAGE = MyModule
|
||||
|
||||
int
|
||||
add(a, b)
|
||||
int a
|
||||
int b
|
||||
CODE:
|
||||
RETVAL = _add(a, b);
|
||||
OUTPUT:
|
||||
RETVAL
|
||||
Reference in New Issue
Block a user