mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-19 19:10:17 +00:00
15 lines
309 B
C
15 lines
309 B
C
#include "pocketpy.h"
|
|
|
|
static bool hello_add(int argc, py_Ref argv){
|
|
PY_CHECK_ARGC(2);
|
|
return py_binaryadd(py_arg(0), py_arg(1));
|
|
}
|
|
|
|
bool py_module_initialize(){
|
|
py_GlobalRef mod = py_newmodule("hello");
|
|
|
|
py_bindfunc(mod, "add", hello_add);
|
|
|
|
py_assign(py_retval(), mod);
|
|
return true;
|
|
} |