mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
fc2a80122b
commit
891ce80fb4
14
src/c.pyi
14
src/c.pyi
@ -126,3 +126,17 @@ ulonglong_ = refl("ulonglong")
|
||||
float_ = refl("float")
|
||||
double_ = refl("double")
|
||||
bool_ = refl("bool")
|
||||
|
||||
char_p = void_p
|
||||
uchar_p = void_p
|
||||
short_p = void_p
|
||||
ushort_p = void_p
|
||||
int_p = void_p
|
||||
uint_p = void_p
|
||||
long_p = void_p
|
||||
ulong_p = void_p
|
||||
longlong_p = void_p
|
||||
ulonglong_p = void_p
|
||||
float_p = void_p
|
||||
double_p = void_p
|
||||
bool_p = void_p
|
@ -545,8 +545,10 @@ inline void add_module_c(VM* vm){
|
||||
add_refl_type("bool", sizeof(bool), {});
|
||||
add_refl_type("void_p", sizeof(void*), {});
|
||||
|
||||
PyObject* void_p_t = mod->attr("void_p");
|
||||
for(const char* t: {"char", "uchar", "short", "ushort", "int", "uint", "long", "ulong", "longlong", "ulonglong", "float", "double", "bool"}){
|
||||
mod->attr().set(Str(t) + "_", VAR_T(C99ReflType, _refl_types[t]));
|
||||
mod->attr().set(Str(t) + "_p", void_p_t);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user