Fri, 03 Jun 2016 09:16:07 +0200
Added printrun sourcecode from
https://github.com/kliment/Printrun
03.06.2016 09:10
15 | 1 | typedef int (*NyHeapDef_SizeGetter) (PyObject *obj); |
2 | typedef struct { | |
3 | int flags; /* As yet, only 0 */ | |
4 | PyTypeObject *type; /* The type it regards */ | |
5 | NyHeapDef_SizeGetter size; | |
6 | void *traverse; | |
7 | void *relate; | |
8 | void *resv3, *resv4, *resv5; /* Reserved for future bin. comp. */ | |
9 | } NyHeapDef; | |
10 | ||
11 | int gline_size(struct __pyx_obj_8printrun_11gcoder_line_GLine *gline) { | |
12 | int size = __pyx_type_8printrun_11gcoder_line_GLine.tp_basicsize; | |
13 | if (gline->_raw != NULL) | |
14 | size += strlen(gline->_raw) + 1; | |
15 | if (gline->_command != NULL) | |
16 | size += strlen(gline->_command) + 1; | |
17 | return size; | |
18 | } | |
19 | ||
20 | static NyHeapDef nysets_heapdefs[] = { | |
21 | {0, 0, (NyHeapDef_SizeGetter) gline_size}, | |
22 | }; | |
23 | ||
24 | /* | |
25 | nysets_heapdefs[0].type = &__pyx_type_8printrun_11gcoder_line_GLine; | |
26 | if (PyDict_SetItemString(__pyx_d, | |
27 | "_NyHeapDefs_", | |
28 | PyCObject_FromVoidPtrAndDesc(&nysets_heapdefs, "NyHeapDef[] v1.0", 0)) < 0) | |
29 | {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} | |
30 | */ |