printrun-src/printrun/gcoder_line_extra.h

Fri, 03 Jun 2016 21:14:09 +0200

author
mbayer
date
Fri, 03 Jun 2016 21:14:09 +0200
changeset 19
234037fbca4b
parent 15
0bbb006204fc
permissions
-rw-r--r--

Bugfixing, Added M400 magic

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

mercurial