Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Generated new pylibemu.c

  • Loading branch information...
commit 85040a23131e439d36a58c686608a4a587b81ff5 1 parent 61ca396
Angelo Dell'Aera authored

Showing 1 changed file with 208 additions and 155 deletions. Show diff stats Hide diff stats

  1. 363  src/pylibemu.c
363  src/pylibemu.c
... ...
@@ -1,4 +1,4 @@
1  
-/* Generated by Cython 0.14.1 on Tue May 22 16:46:55 2012 */
  1
+/* Generated by Cython 0.14.1 on Wed May 23 10:35:36 2012 */
2 2
 
3 3
 #define PY_SSIZE_T_CLEAN
4 4
 #include "Python.h"
@@ -695,12 +695,13 @@ static char __pyx_k_41[] = "shellcode_getpc_test";
695 695
 static char __pyx_k_42[] = "Emulator not initialized";
696 696
 static char __pyx_k_62[] = "Error while reading a byte at address 0x%x";
697 697
 static char __pyx_k_64[] = "Error while reading a word at address 0x%x";
698  
-static char __pyx_k_67[] = "Error while reading a dword at address 0x%x";
699  
-static char __pyx_k_69[] = "Error while reading a string at address 0x%x";
700  
-static char __pyx_k_73[] = "Emulator environment error";
701  
-static char __pyx_k_75[] = "%(asctime)s %(message)s";
702  
-static char __pyx_k_76[] = "[%Y-%m-%d %H:%M:%S]";
703  
-static char __pyx_k_77[] = "emu_profile_truncated";
  698
+static char __pyx_k_67[] = "Error while allocating memory";
  699
+static char __pyx_k_69[] = "Error while reading a dword at address 0x%x";
  700
+static char __pyx_k_71[] = "Error while reading a string at address 0x%x";
  701
+static char __pyx_k_75[] = "Emulator environment error";
  702
+static char __pyx_k_77[] = "%(asctime)s %(message)s";
  703
+static char __pyx_k_78[] = "[%Y-%m-%d %H:%M:%S]";
  704
+static char __pyx_k_79[] = "emu_profile_truncated";
704 705
 static char __pyx_k__s[] = "s";
705 706
 static char __pyx_k__wb[] = "wb";
706 707
 static char __pyx_k__eax[] = "eax";
@@ -817,10 +818,11 @@ static PyObject *__pyx_kp_s_62;
817 818
 static PyObject *__pyx_kp_s_64;
818 819
 static PyObject *__pyx_kp_s_67;
819 820
 static PyObject *__pyx_kp_s_69;
820  
-static PyObject *__pyx_kp_s_73;
  821
+static PyObject *__pyx_kp_s_71;
821 822
 static PyObject *__pyx_kp_s_75;
822  
-static PyObject *__pyx_kp_s_76;
823  
-static PyObject *__pyx_n_s_77;
  823
+static PyObject *__pyx_kp_s_77;
  824
+static PyObject *__pyx_kp_s_78;
  825
+static PyObject *__pyx_n_s_79;
824 826
 static PyObject *__pyx_n_s__EMU_REGS;
825 827
 static PyObject *__pyx_n_s__Error;
826 828
 static PyObject *__pyx_n_s__RuntimeError;
@@ -956,9 +958,10 @@ static PyObject *__pyx_k_tuple_65;
956 958
 static PyObject *__pyx_k_tuple_66;
957 959
 static PyObject *__pyx_k_tuple_68;
958 960
 static PyObject *__pyx_k_tuple_70;
959  
-static PyObject *__pyx_k_tuple_71;
960 961
 static PyObject *__pyx_k_tuple_72;
  962
+static PyObject *__pyx_k_tuple_73;
961 963
 static PyObject *__pyx_k_tuple_74;
  964
+static PyObject *__pyx_k_tuple_76;
962 965
 
963 966
 /* "pylibemu.pyx":42
964 967
  * 
@@ -7040,7 +7043,7 @@ static char __pyx_doc_8pylibemu_8Emulator_30memory_read_byte[] = " \n        Met
7040 7043
 static PyObject *__pyx_pf_8pylibemu_8Emulator_30memory_read_byte(PyObject *__pyx_v_self, PyObject *__pyx_arg_addr) {
7041 7044
   uint32_t __pyx_v_addr;
7042 7045
   struct emu_memory *__pyx_v__mem;
7043  
-  uint8_t *__pyx_v_byte;
  7046
+  uint8_t __pyx_v_byte;
7044 7047
   PyObject *__pyx_r = NULL;
7045 7048
   int __pyx_t_1;
7046 7049
   PyObject *__pyx_t_2 = NULL;
@@ -7058,7 +7061,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_30memory_read_byte(PyObject *__pyx
7058 7061
   __pyx_L4_argument_unpacking_done:;
7059 7062
 
7060 7063
   /* "pylibemu.pyx":995
7061  
- *         cdef uint8_t      *byte
  7064
+ *         cdef uint8_t      byte
7062 7065
  * 
7063 7066
  *         if self._emu is NULL:             # <<<<<<<<<<<<<<
7064 7067
  *             raise RuntimeError('Emulator not initialized')
@@ -7087,7 +7090,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_30memory_read_byte(PyObject *__pyx
7087 7090
  *             raise RuntimeError('Emulator not initialized')
7088 7091
  * 
7089 7092
  *         _mem = emu_memory_get(self._emu)             # <<<<<<<<<<<<<<
7090  
- *         if emu_memory_read_byte(_mem, addr, byte):
  7093
+ *         if emu_memory_read_byte(_mem, addr, &byte):
7091 7094
  *             raise RuntimeError("Error while reading a byte at address 0x%x" % (addr, ))
7092 7095
  */
7093 7096
   __pyx_v__mem = emu_memory_get(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
@@ -7095,19 +7098,19 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_30memory_read_byte(PyObject *__pyx
7095 7098
   /* "pylibemu.pyx":999
7096 7099
  * 
7097 7100
  *         _mem = emu_memory_get(self._emu)
7098  
- *         if emu_memory_read_byte(_mem, addr, byte):             # <<<<<<<<<<<<<<
  7101
+ *         if emu_memory_read_byte(_mem, addr, &byte):             # <<<<<<<<<<<<<<
7099 7102
  *             raise RuntimeError("Error while reading a byte at address 0x%x" % (addr, ))
7100 7103
  * 
7101 7104
  */
7102  
-  __pyx_t_3 = emu_memory_read_byte(__pyx_v__mem, __pyx_v_addr, __pyx_v_byte);
  7105
+  __pyx_t_3 = emu_memory_read_byte(__pyx_v__mem, __pyx_v_addr, (&__pyx_v_byte));
7103 7106
   if (__pyx_t_3) {
7104 7107
 
7105 7108
     /* "pylibemu.pyx":1000
7106 7109
  *         _mem = emu_memory_get(self._emu)
7107  
- *         if emu_memory_read_byte(_mem, addr, byte):
  7110
+ *         if emu_memory_read_byte(_mem, addr, &byte):
7108 7111
  *             raise RuntimeError("Error while reading a byte at address 0x%x" % (addr, ))             # <<<<<<<<<<<<<<
7109 7112
  * 
7110  
- *         return byte[0]
  7113
+ *         return byte
7111 7114
  */
7112 7115
     __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_addr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1000; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7113 7116
     __Pyx_GOTREF(__pyx_t_2);
@@ -7137,12 +7140,12 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_30memory_read_byte(PyObject *__pyx
7137 7140
   /* "pylibemu.pyx":1002
7138 7141
  *             raise RuntimeError("Error while reading a byte at address 0x%x" % (addr, ))
7139 7142
  * 
7140  
- *         return byte[0]             # <<<<<<<<<<<<<<
  7143
+ *         return byte             # <<<<<<<<<<<<<<
7141 7144
  * 
7142 7145
  *     def memory_read_word(self, uint32_t addr):
7143 7146
  */
7144 7147
   __Pyx_XDECREF(__pyx_r);
7145  
-  __pyx_t_2 = __Pyx_PyInt_to_py_uint8_t((__pyx_v_byte[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7148
+  __pyx_t_2 = __Pyx_PyInt_to_py_uint8_t(__pyx_v_byte); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7146 7149
   __Pyx_GOTREF(__pyx_t_2);
7147 7150
   __pyx_r = __pyx_t_2;
7148 7151
   __pyx_t_2 = 0;
@@ -7162,7 +7165,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_30memory_read_byte(PyObject *__pyx
7162 7165
 }
7163 7166
 
7164 7167
 /* "pylibemu.pyx":1004
7165  
- *         return byte[0]
  7168
+ *         return byte
7166 7169
  * 
7167 7170
  *     def memory_read_word(self, uint32_t addr):             # <<<<<<<<<<<<<<
7168 7171
  *         '''
@@ -7174,7 +7177,7 @@ static char __pyx_doc_8pylibemu_8Emulator_31memory_read_word[] = " \n        Met
7174 7177
 static PyObject *__pyx_pf_8pylibemu_8Emulator_31memory_read_word(PyObject *__pyx_v_self, PyObject *__pyx_arg_addr) {
7175 7178
   uint32_t __pyx_v_addr;
7176 7179
   struct emu_memory *__pyx_v__mem;
7177  
-  uint16_t *__pyx_v_word;
  7180
+  uint16_t __pyx_v_word;
7178 7181
   PyObject *__pyx_r = NULL;
7179 7182
   int __pyx_t_1;
7180 7183
   PyObject *__pyx_t_2 = NULL;
@@ -7192,7 +7195,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_31memory_read_word(PyObject *__pyx
7192 7195
   __pyx_L4_argument_unpacking_done:;
7193 7196
 
7194 7197
   /* "pylibemu.pyx":1019
7195  
- *         cdef uint16_t     *word
  7198
+ *         cdef uint16_t     word
7196 7199
  * 
7197 7200
  *         if self._emu is NULL:             # <<<<<<<<<<<<<<
7198 7201
  *             raise RuntimeError('Emulator not initialized')
@@ -7221,7 +7224,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_31memory_read_word(PyObject *__pyx
7221 7224
  *             raise RuntimeError('Emulator not initialized')
7222 7225
  * 
7223 7226
  *         _mem = emu_memory_get(self._emu)             # <<<<<<<<<<<<<<
7224  
- *         if emu_memory_read_word(_mem, addr, word):
  7227
+ *         if emu_memory_read_word(_mem, addr, &word):
7225 7228
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))
7226 7229
  */
7227 7230
   __pyx_v__mem = emu_memory_get(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
@@ -7229,19 +7232,19 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_31memory_read_word(PyObject *__pyx
7229 7232
   /* "pylibemu.pyx":1023
7230 7233
  * 
7231 7234
  *         _mem = emu_memory_get(self._emu)
7232  
- *         if emu_memory_read_word(_mem, addr, word):             # <<<<<<<<<<<<<<
  7235
+ *         if emu_memory_read_word(_mem, addr, &word):             # <<<<<<<<<<<<<<
7233 7236
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))
7234 7237
  * 
7235 7238
  */
7236  
-  __pyx_t_3 = emu_memory_read_word(__pyx_v__mem, __pyx_v_addr, __pyx_v_word);
  7239
+  __pyx_t_3 = emu_memory_read_word(__pyx_v__mem, __pyx_v_addr, (&__pyx_v_word));
7237 7240
   if (__pyx_t_3) {
7238 7241
 
7239 7242
     /* "pylibemu.pyx":1024
7240 7243
  *         _mem = emu_memory_get(self._emu)
7241  
- *         if emu_memory_read_word(_mem, addr, word):
  7244
+ *         if emu_memory_read_word(_mem, addr, &word):
7242 7245
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))             # <<<<<<<<<<<<<<
7243 7246
  * 
7244  
- *         return word[0]
  7247
+ *         return word
7245 7248
  */
7246 7249
     __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_addr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7247 7250
     __Pyx_GOTREF(__pyx_t_2);
@@ -7271,12 +7274,12 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_31memory_read_word(PyObject *__pyx
7271 7274
   /* "pylibemu.pyx":1026
7272 7275
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))
7273 7276
  * 
7274  
- *         return word[0]             # <<<<<<<<<<<<<<
  7277
+ *         return word             # <<<<<<<<<<<<<<
7275 7278
  * 
7276 7279
  *     def memory_read_dword(self, uint32_t addr):
7277 7280
  */
7278 7281
   __Pyx_XDECREF(__pyx_r);
7279  
-  __pyx_t_2 = __Pyx_PyInt_to_py_uint16_t((__pyx_v_word[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7282
+  __pyx_t_2 = __Pyx_PyInt_to_py_uint16_t(__pyx_v_word); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7280 7283
   __Pyx_GOTREF(__pyx_t_2);
7281 7284
   __pyx_r = __pyx_t_2;
7282 7285
   __pyx_t_2 = 0;
@@ -7296,7 +7299,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_31memory_read_word(PyObject *__pyx
7296 7299
 }
7297 7300
 
7298 7301
 /* "pylibemu.pyx":1028
7299  
- *         return word[0]
  7302
+ *         return word
7300 7303
  * 
7301 7304
  *     def memory_read_dword(self, uint32_t addr):             # <<<<<<<<<<<<<<
7302 7305
  *         '''
@@ -7308,7 +7311,7 @@ static char __pyx_doc_8pylibemu_8Emulator_32memory_read_dword[] = " \n        Me
7308 7311
 static PyObject *__pyx_pf_8pylibemu_8Emulator_32memory_read_dword(PyObject *__pyx_v_self, PyObject *__pyx_arg_addr) {
7309 7312
   uint32_t __pyx_v_addr;
7310 7313
   struct emu_memory *__pyx_v__mem;
7311  
-  uint32_t *__pyx_v_dword;
  7314
+  uint32_t __pyx_v_dword;
7312 7315
   PyObject *__pyx_r = NULL;
7313 7316
   int __pyx_t_1;
7314 7317
   PyObject *__pyx_t_2 = NULL;
@@ -7326,7 +7329,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_32memory_read_dword(PyObject *__py
7326 7329
   __pyx_L4_argument_unpacking_done:;
7327 7330
 
7328 7331
   /* "pylibemu.pyx":1043
7329  
- *         cdef uint32_t     *dword
  7332
+ *         cdef uint32_t     dword
7330 7333
  * 
7331 7334
  *         if self._emu is NULL:             # <<<<<<<<<<<<<<
7332 7335
  *             raise RuntimeError('Emulator not initialized')
@@ -7355,7 +7358,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_32memory_read_dword(PyObject *__py
7355 7358
  *             raise RuntimeError('Emulator not initialized')
7356 7359
  * 
7357 7360
  *         _mem = emu_memory_get(self._emu)             # <<<<<<<<<<<<<<
7358  
- *         if emu_memory_read_dword(_mem, addr, dword):
  7361
+ *         if emu_memory_read_dword(_mem, addr, &dword):
7359 7362
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))
7360 7363
  */
7361 7364
   __pyx_v__mem = emu_memory_get(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
@@ -7363,19 +7366,19 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_32memory_read_dword(PyObject *__py
7363 7366
   /* "pylibemu.pyx":1047
7364 7367
  * 
7365 7368
  *         _mem = emu_memory_get(self._emu)
7366  
- *         if emu_memory_read_dword(_mem, addr, dword):             # <<<<<<<<<<<<<<
  7369
+ *         if emu_memory_read_dword(_mem, addr, &dword):             # <<<<<<<<<<<<<<
7367 7370
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))
7368 7371
  * 
7369 7372
  */
7370  
-  __pyx_t_3 = emu_memory_read_dword(__pyx_v__mem, __pyx_v_addr, __pyx_v_dword);
  7373
+  __pyx_t_3 = emu_memory_read_dword(__pyx_v__mem, __pyx_v_addr, (&__pyx_v_dword));
7371 7374
   if (__pyx_t_3) {
7372 7375
 
7373 7376
     /* "pylibemu.pyx":1048
7374 7377
  *         _mem = emu_memory_get(self._emu)
7375  
- *         if emu_memory_read_dword(_mem, addr, dword):
  7378
+ *         if emu_memory_read_dword(_mem, addr, &dword):
7376 7379
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))             # <<<<<<<<<<<<<<
7377 7380
  * 
7378  
- *         return dword[0]
  7381
+ *         return dword
7379 7382
  */
7380 7383
     __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_addr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7381 7384
     __Pyx_GOTREF(__pyx_t_2);
@@ -7405,12 +7408,12 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_32memory_read_dword(PyObject *__py
7405 7408
   /* "pylibemu.pyx":1050
7406 7409
  *             raise RuntimeError("Error while reading a word at address 0x%x" % (addr, ))
7407 7410
  * 
7408  
- *         return dword[0]             # <<<<<<<<<<<<<<
  7411
+ *         return dword             # <<<<<<<<<<<<<<
7409 7412
  * 
7410 7413
  *     def memory_read_block(self, uint32_t addr, size_t _len):
7411 7414
  */
7412 7415
   __Pyx_XDECREF(__pyx_r);
7413  
-  __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t((__pyx_v_dword[0])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7416
+  __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_dword); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7414 7417
   __Pyx_GOTREF(__pyx_t_2);
7415 7418
   __pyx_r = __pyx_t_2;
7416 7419
   __pyx_t_2 = 0;
@@ -7430,7 +7433,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_32memory_read_dword(PyObject *__py
7430 7433
 }
7431 7434
 
7432 7435
 /* "pylibemu.pyx":1052
7433  
- *         return dword[0]
  7436
+ *         return dword
7434 7437
  * 
7435 7438
  *     def memory_read_block(self, uint32_t addr, size_t _len):             # <<<<<<<<<<<<<<
7436 7439
  *         '''
@@ -7507,7 +7510,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_33memory_read_block(PyObject *__py
7507 7510
  *         if self._emu is NULL:
7508 7511
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
7509 7512
  * 
7510  
- *         _mem = emu_memory_get(self._emu)
  7513
+ *         block = malloc(_len)
7511 7514
  */
7512 7515
     __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_66), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7513 7516
     __Pyx_GOTREF(__pyx_t_2);
@@ -7521,13 +7524,48 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_33memory_read_block(PyObject *__py
7521 7524
   /* "pylibemu.pyx":1073
7522 7525
  *             raise RuntimeError('Emulator not initialized')
7523 7526
  * 
  7527
+ *         block = malloc(_len)             # <<<<<<<<<<<<<<
  7528
+ *         if block is NULL:
  7529
+ *             raise RuntimeError('Error while allocating memory')
  7530
+ */
  7531
+  __pyx_v_block = malloc(__pyx_v__len);
  7532
+
  7533
+  /* "pylibemu.pyx":1074
  7534
+ * 
  7535
+ *         block = malloc(_len)
  7536
+ *         if block is NULL:             # <<<<<<<<<<<<<<
  7537
+ *             raise RuntimeError('Error while allocating memory')
  7538
+ * 
  7539
+ */
  7540
+  __pyx_t_1 = (__pyx_v_block == NULL);
  7541
+  if (__pyx_t_1) {
  7542
+
  7543
+    /* "pylibemu.pyx":1075
  7544
+ *         block = malloc(_len)
  7545
+ *         if block is NULL:
  7546
+ *             raise RuntimeError('Error while allocating memory')             # <<<<<<<<<<<<<<
  7547
+ * 
  7548
+ *         _mem = emu_memory_get(self._emu)
  7549
+ */
  7550
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7551
+    __Pyx_GOTREF(__pyx_t_2);
  7552
+    __Pyx_Raise(__pyx_t_2, 0, 0);
  7553
+    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  7554
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7555
+    goto __pyx_L7;
  7556
+  }
  7557
+  __pyx_L7:;
  7558
+
  7559
+  /* "pylibemu.pyx":1077
  7560
+ *             raise RuntimeError('Error while allocating memory')
  7561
+ * 
7524 7562
  *         _mem = emu_memory_get(self._emu)             # <<<<<<<<<<<<<<
7525 7563
  *         if emu_memory_read_block(_mem, addr, block, _len):
7526 7564
  *             raise RuntimeError("Error while reading a dword at address 0x%x" % (addr, ))
7527 7565
  */
7528 7566
   __pyx_v__mem = emu_memory_get(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
7529 7567
 
7530  
-  /* "pylibemu.pyx":1074
  7568
+  /* "pylibemu.pyx":1078
7531 7569
  * 
7532 7570
  *         _mem = emu_memory_get(self._emu)
7533 7571
  *         if emu_memory_read_block(_mem, addr, block, _len):             # <<<<<<<<<<<<<<
@@ -7537,39 +7575,39 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_33memory_read_block(PyObject *__py
7537 7575
   __pyx_t_3 = emu_memory_read_block(__pyx_v__mem, __pyx_v_addr, __pyx_v_block, __pyx_v__len);
7538 7576
   if (__pyx_t_3) {
7539 7577
 
7540  
-    /* "pylibemu.pyx":1075
  7578
+    /* "pylibemu.pyx":1079
7541 7579
  *         _mem = emu_memory_get(self._emu)
7542 7580
  *         if emu_memory_read_block(_mem, addr, block, _len):
7543 7581
  *             raise RuntimeError("Error while reading a dword at address 0x%x" % (addr, ))             # <<<<<<<<<<<<<<
7544 7582
  * 
7545 7583
  *         return <char *>block
7546 7584
  */
7547  
-    __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_addr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7585
+    __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_addr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7548 7586
     __Pyx_GOTREF(__pyx_t_2);
7549  
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7587
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7550 7588
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
7551 7589
     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
7552 7590
     __Pyx_GIVEREF(__pyx_t_2);
7553 7591
     __pyx_t_2 = 0;
7554  
-    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_67), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7592
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_69), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7555 7593
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7556 7594
     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
7557  
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7595
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7558 7596
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
7559 7597
     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2));
7560 7598
     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
7561 7599
     __pyx_t_2 = 0;
7562  
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7600
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7563 7601
     __Pyx_GOTREF(__pyx_t_2);
7564 7602
     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
7565 7603
     __Pyx_Raise(__pyx_t_2, 0, 0);
7566 7604
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7567  
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7568  
-    goto __pyx_L7;
  7605
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7606
+    goto __pyx_L8;
7569 7607
   }
7570  
-  __pyx_L7:;
  7608
+  __pyx_L8:;
7571 7609
 
7572  
-  /* "pylibemu.pyx":1077
  7610
+  /* "pylibemu.pyx":1081
7573 7611
  *             raise RuntimeError("Error while reading a dword at address 0x%x" % (addr, ))
7574 7612
  * 
7575 7613
  *         return <char *>block             # <<<<<<<<<<<<<<
@@ -7577,7 +7615,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_33memory_read_block(PyObject *__py
7577 7615
  *     def memory_read_string(self, uint32_t addr, uint32_t maxsize):
7578 7616
  */
7579 7617
   __Pyx_XDECREF(__pyx_r);
7580  
-  __pyx_t_2 = PyBytes_FromString(((char *)__pyx_v_block)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1077; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7618
+  __pyx_t_2 = PyBytes_FromString(((char *)__pyx_v_block)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1081; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7581 7619
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7582 7620
   __pyx_r = ((PyObject *)__pyx_t_2);
7583 7621
   __pyx_t_2 = 0;
@@ -7596,7 +7634,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_33memory_read_block(PyObject *__py
7596 7634
   return __pyx_r;
7597 7635
 }
7598 7636
 
7599  
-/* "pylibemu.pyx":1079
  7637
+/* "pylibemu.pyx":1083
7600 7638
  *         return <char *>block
7601 7639
  * 
7602 7640
  *     def memory_read_string(self, uint32_t addr, uint32_t maxsize):             # <<<<<<<<<<<<<<
@@ -7610,7 +7648,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_34memory_read_string(PyObject *__p
7610 7648
   uint32_t __pyx_v_addr;
7611 7649
   uint32_t __pyx_v_maxsize;
7612 7650
   struct emu_memory *__pyx_v__mem;
7613  
-  struct emu_string *__pyx_v_s;
  7651
+  struct emu_string __pyx_v_s;
7614 7652
   PyObject *__pyx_r = NULL;
7615 7653
   int __pyx_t_1;
7616 7654
   PyObject *__pyx_t_2 = NULL;
@@ -7636,31 +7674,31 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_34memory_read_string(PyObject *__p
7636 7674
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__maxsize);
7637 7675
       if (likely(values[1])) kw_args--;
7638 7676
       else {
7639  
-        __Pyx_RaiseArgtupleInvalid("memory_read_string", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7677
+        __Pyx_RaiseArgtupleInvalid("memory_read_string", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7640 7678
       }
7641 7679
     }
7642 7680
     if (unlikely(kw_args > 0)) {
7643  
-      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "memory_read_string") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7681
+      if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "memory_read_string") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7644 7682
     }
7645  
-    __pyx_v_addr = __Pyx_PyInt_from_py_uint32_t(values[0]); if (unlikely((__pyx_v_addr == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7646  
-    __pyx_v_maxsize = __Pyx_PyInt_from_py_uint32_t(values[1]); if (unlikely((__pyx_v_maxsize == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7683
+    __pyx_v_addr = __Pyx_PyInt_from_py_uint32_t(values[0]); if (unlikely((__pyx_v_addr == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7684
+    __pyx_v_maxsize = __Pyx_PyInt_from_py_uint32_t(values[1]); if (unlikely((__pyx_v_maxsize == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7647 7685
   } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
7648 7686
     goto __pyx_L5_argtuple_error;
7649 7687
   } else {
7650  
-    __pyx_v_addr = __Pyx_PyInt_from_py_uint32_t(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_addr == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7651  
-    __pyx_v_maxsize = __Pyx_PyInt_from_py_uint32_t(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_maxsize == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7688
+    __pyx_v_addr = __Pyx_PyInt_from_py_uint32_t(PyTuple_GET_ITEM(__pyx_args, 0)); if (unlikely((__pyx_v_addr == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7689
+    __pyx_v_maxsize = __Pyx_PyInt_from_py_uint32_t(PyTuple_GET_ITEM(__pyx_args, 1)); if (unlikely((__pyx_v_maxsize == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7652 7690
   }
7653 7691
   goto __pyx_L4_argument_unpacking_done;
7654 7692
   __pyx_L5_argtuple_error:;
7655  
-  __Pyx_RaiseArgtupleInvalid("memory_read_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7693
+  __Pyx_RaiseArgtupleInvalid("memory_read_string", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1083; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7656 7694
   __pyx_L3_error:;
7657 7695
   __Pyx_AddTraceback("pylibemu.Emulator.memory_read_string");
7658 7696
   __Pyx_RefNannyFinishContext();
7659 7697
   return NULL;
7660 7698
   __pyx_L4_argument_unpacking_done:;
7661 7699
 
7662  
-  /* "pylibemu.pyx":1097
7663  
- *         cdef c_emu_string *s
  7700
+  /* "pylibemu.pyx":1101
  7701
+ *         cdef c_emu_string s
7664 7702
  * 
7665 7703
  *         if self._emu is NULL:             # <<<<<<<<<<<<<<
7666 7704
  *             raise RuntimeError('Emulator not initialized')
@@ -7669,82 +7707,82 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_34memory_read_string(PyObject *__p
7669 7707
   __pyx_t_1 = (((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu == NULL);
7670 7708
   if (__pyx_t_1) {
7671 7709
 
7672  
-    /* "pylibemu.pyx":1098
  7710
+    /* "pylibemu.pyx":1102
7673 7711
  * 
7674 7712
  *         if self._emu is NULL:
7675 7713
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
7676 7714
  * 
7677 7715
  *         _mem = emu_memory_get(self._emu)
7678 7716
  */
7679  
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_68), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7717
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_70), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7680 7718
     __Pyx_GOTREF(__pyx_t_2);
7681 7719
     __Pyx_Raise(__pyx_t_2, 0, 0);
7682 7720
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7683  
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7721
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7684 7722
     goto __pyx_L6;
7685 7723
   }
7686 7724
   __pyx_L6:;
7687 7725
 
7688  
-  /* "pylibemu.pyx":1100
  7726
+  /* "pylibemu.pyx":1104
7689 7727
  *             raise RuntimeError('Emulator not initialized')
7690 7728
  * 
7691 7729
  *         _mem = emu_memory_get(self._emu)             # <<<<<<<<<<<<<<
7692  
- *         if emu_memory_read_string(_mem, addr, s, maxsize):
  7730
+ *         if emu_memory_read_string(_mem, addr, &s, maxsize):
7693 7731
  *             raise RuntimeError("Error while reading a string at address 0x%x" % (addr, ))
7694 7732
  */
7695 7733
   __pyx_v__mem = emu_memory_get(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
7696 7734
 
7697  
-  /* "pylibemu.pyx":1101
  7735
+  /* "pylibemu.pyx":1105
7698 7736
  * 
7699 7737
  *         _mem = emu_memory_get(self._emu)
7700  
- *         if emu_memory_read_string(_mem, addr, s, maxsize):             # <<<<<<<<<<<<<<
  7738
+ *         if emu_memory_read_string(_mem, addr, &s, maxsize):             # <<<<<<<<<<<<<<
7701 7739
  *             raise RuntimeError("Error while reading a string at address 0x%x" % (addr, ))
7702 7740
  * 
7703 7741
  */
7704  
-  __pyx_t_3 = emu_memory_read_string(__pyx_v__mem, __pyx_v_addr, __pyx_v_s, __pyx_v_maxsize);
  7742
+  __pyx_t_3 = emu_memory_read_string(__pyx_v__mem, __pyx_v_addr, (&__pyx_v_s), __pyx_v_maxsize);
7705 7743
   if (__pyx_t_3) {
7706 7744
 
7707  
-    /* "pylibemu.pyx":1102
  7745
+    /* "pylibemu.pyx":1106
7708 7746
  *         _mem = emu_memory_get(self._emu)
7709  
- *         if emu_memory_read_string(_mem, addr, s, maxsize):
  7747
+ *         if emu_memory_read_string(_mem, addr, &s, maxsize):
7710 7748
  *             raise RuntimeError("Error while reading a string at address 0x%x" % (addr, ))             # <<<<<<<<<<<<<<
7711 7749
  * 
7712  
- *         return <char *>s[0].data
  7750
+ *         return <char *>s.data
7713 7751
  */
7714  
-    __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_addr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7752
+    __pyx_t_2 = __Pyx_PyInt_to_py_uint32_t(__pyx_v_addr); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7715 7753
     __Pyx_GOTREF(__pyx_t_2);
7716  
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7754
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7717 7755
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
7718 7756
     PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
7719 7757
     __Pyx_GIVEREF(__pyx_t_2);
7720 7758
     __pyx_t_2 = 0;
7721  
-    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_69), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7759
+    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_71), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7722 7760
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7723 7761
     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
7724  
-    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7762
+    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7725 7763
     __Pyx_GOTREF(((PyObject *)__pyx_t_4));
7726 7764
     PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_2));
7727 7765
     __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
7728 7766
     __pyx_t_2 = 0;
7729  
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7767
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7730 7768
     __Pyx_GOTREF(__pyx_t_2);
7731 7769
     __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
7732 7770
     __Pyx_Raise(__pyx_t_2, 0, 0);
7733 7771
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7734  
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7772
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7735 7773
     goto __pyx_L7;
7736 7774
   }
7737 7775
   __pyx_L7:;
7738 7776
 
7739  
-  /* "pylibemu.pyx":1104
  7777
+  /* "pylibemu.pyx":1108
7740 7778
  *             raise RuntimeError("Error while reading a string at address 0x%x" % (addr, ))
7741 7779
  * 
7742  
- *         return <char *>s[0].data             # <<<<<<<<<<<<<<
  7780
+ *         return <char *>s.data             # <<<<<<<<<<<<<<
7743 7781
  * 
7744 7782
  *     def memory_segment_select(self, c_emu_segment segment):
7745 7783
  */
7746 7784
   __Pyx_XDECREF(__pyx_r);
7747  
-  __pyx_t_2 = PyBytes_FromString(((char *)(__pyx_v_s[0]).data)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7785
+  __pyx_t_2 = PyBytes_FromString(((char *)__pyx_v_s.data)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1108; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7748 7786
   __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7749 7787
   __pyx_r = ((PyObject *)__pyx_t_2);
7750 7788
   __pyx_t_2 = 0;
@@ -7763,8 +7801,8 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_34memory_read_string(PyObject *__p
7763 7801
   return __pyx_r;
7764 7802
 }
7765 7803
 
7766  
-/* "pylibemu.pyx":1106
7767  
- *         return <char *>s[0].data
  7804
+/* "pylibemu.pyx":1110
  7805
+ *         return <char *>s.data
7768 7806
  * 
7769 7807
  *     def memory_segment_select(self, c_emu_segment segment):             # <<<<<<<<<<<<<<
7770 7808
  *         '''
@@ -7781,7 +7819,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_35memory_segment_select(PyObject *
7781 7819
   PyObject *__pyx_t_2 = NULL;
7782 7820
   __Pyx_RefNannySetupContext("memory_segment_select");
7783 7821
   assert(__pyx_arg_segment); {
7784  
-    __pyx_v_segment = ((enum emu_segment)PyInt_AsLong(__pyx_arg_segment)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  7822
+    __pyx_v_segment = ((enum emu_segment)PyInt_AsLong(__pyx_arg_segment)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1110; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
7785 7823
   }
7786 7824
   goto __pyx_L4_argument_unpacking_done;
7787 7825
   __pyx_L3_error:;
@@ -7790,7 +7828,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_35memory_segment_select(PyObject *
7790 7828
   return NULL;
7791 7829
   __pyx_L4_argument_unpacking_done:;
7792 7830
 
7793  
-  /* "pylibemu.pyx":1123
  7831
+  /* "pylibemu.pyx":1127
7794 7832
  *         cdef c_emu_memory *_mem
7795 7833
  * 
7796 7834
  *         if self._emu is NULL:             # <<<<<<<<<<<<<<
@@ -7800,23 +7838,23 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_35memory_segment_select(PyObject *
7800 7838
   __pyx_t_1 = (((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu == NULL);
7801 7839
   if (__pyx_t_1) {
7802 7840
 
7803  
-    /* "pylibemu.pyx":1124
  7841
+    /* "pylibemu.pyx":1128
7804 7842
  * 
7805 7843
  *         if self._emu is NULL:
7806 7844
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
7807 7845
  * 
7808 7846
  *         _mem = emu_memory_get(self._emu)
7809 7847
  */
7810  
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_70), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7848
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7811 7849
     __Pyx_GOTREF(__pyx_t_2);
7812 7850
     __Pyx_Raise(__pyx_t_2, 0, 0);
7813 7851
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7814  
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7852
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7815 7853
     goto __pyx_L5;
7816 7854
   }
7817 7855
   __pyx_L5:;
7818 7856
 
7819  
-  /* "pylibemu.pyx":1126
  7857
+  /* "pylibemu.pyx":1130
7820 7858
  *             raise RuntimeError('Emulator not initialized')
7821 7859
  * 
7822 7860
  *         _mem = emu_memory_get(self._emu)             # <<<<<<<<<<<<<<
@@ -7825,7 +7863,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_35memory_segment_select(PyObject *
7825 7863
  */
7826 7864
   __pyx_v__mem = emu_memory_get(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
7827 7865
 
7828  
-  /* "pylibemu.pyx":1127
  7866
+  /* "pylibemu.pyx":1131
7829 7867
  * 
7830 7868
  *         _mem = emu_memory_get(self._emu)
7831 7869
  *         emu_memory_segment_select(_mem, segment)             # <<<<<<<<<<<<<<
@@ -7846,7 +7884,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_35memory_segment_select(PyObject *
7846 7884
   return __pyx_r;
7847 7885
 }
7848 7886
 
7849  
-/* "pylibemu.pyx":1129
  7887
+/* "pylibemu.pyx":1133
7850 7888
  *         emu_memory_segment_select(_mem, segment)
7851 7889
  * 
7852 7890
  *     def memory_segment_get(self):             # <<<<<<<<<<<<<<
@@ -7863,7 +7901,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_36memory_segment_get(PyObject *__p
7863 7901
   PyObject *__pyx_t_2 = NULL;
7864 7902
   __Pyx_RefNannySetupContext("memory_segment_get");
7865 7903
 
7866  
-  /* "pylibemu.pyx":1146
  7904
+  /* "pylibemu.pyx":1150
7867 7905
  *         cdef c_emu_memory *_mem
7868 7906
  * 
7869 7907
  *         if self._emu is NULL:             # <<<<<<<<<<<<<<
@@ -7873,23 +7911,23 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_36memory_segment_get(PyObject *__p
7873 7911
   __pyx_t_1 = (((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu == NULL);
7874 7912
   if (__pyx_t_1) {
7875 7913
 
7876  
-    /* "pylibemu.pyx":1147
  7914
+    /* "pylibemu.pyx":1151
7877 7915
  * 
7878 7916
  *         if self._emu is NULL:
7879 7917
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
7880 7918
  * 
7881 7919
  *         _mem = emu_memory_get(self._emu)
7882 7920
  */
7883  
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_71), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7921
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_73), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7884 7922
     __Pyx_GOTREF(__pyx_t_2);
7885 7923
     __Pyx_Raise(__pyx_t_2, 0, 0);
7886 7924
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7887  
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7925
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7888 7926
     goto __pyx_L5;
7889 7927
   }
7890 7928
   __pyx_L5:;
7891 7929
 
7892  
-  /* "pylibemu.pyx":1149
  7930
+  /* "pylibemu.pyx":1153
7893 7931
  *             raise RuntimeError('Emulator not initialized')
7894 7932
  * 
7895 7933
  *         _mem = emu_memory_get(self._emu)             # <<<<<<<<<<<<<<
@@ -7898,7 +7936,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_36memory_segment_get(PyObject *__p
7898 7936
  */
7899 7937
   __pyx_v__mem = emu_memory_get(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
7900 7938
 
7901  
-  /* "pylibemu.pyx":1150
  7939
+  /* "pylibemu.pyx":1154
7902 7940
  * 
7903 7941
  *         _mem = emu_memory_get(self._emu)
7904 7942
  *         return emu_memory_segment_get(_mem)             # <<<<<<<<<<<<<<
@@ -7906,7 +7944,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_36memory_segment_get(PyObject *__p
7906 7944
  *     # Win32 environment
7907 7945
  */
7908 7946
   __Pyx_XDECREF(__pyx_r);
7909  
-  __pyx_t_2 = PyInt_FromLong(emu_memory_segment_get(__pyx_v__mem)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1150; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7947
+  __pyx_t_2 = PyInt_FromLong(emu_memory_segment_get(__pyx_v__mem)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7910 7948
   __Pyx_GOTREF(__pyx_t_2);
7911 7949
   __pyx_r = __pyx_t_2;
7912 7950
   __pyx_t_2 = 0;
@@ -7924,7 +7962,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_36memory_segment_get(PyObject *__p
7924 7962
   return __pyx_r;
7925 7963
 }
7926 7964
 
7927  
-/* "pylibemu.pyx":1153
  7965
+/* "pylibemu.pyx":1157
7928 7966
  * 
7929 7967
  *     # Win32 environment
7930 7968
  *     def env_w32_hook_check(self):             # <<<<<<<<<<<<<<
@@ -7941,7 +7979,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_37env_w32_hook_check(PyObject *__p
7941 7979
   PyObject *__pyx_t_2 = NULL;
7942 7980
   __Pyx_RefNannySetupContext("env_w32_hook_check");
7943 7981
 
7944  
-  /* "pylibemu.pyx":1166
  7982
+  /* "pylibemu.pyx":1170
7945 7983
  *         cdef c_emu_env      *_env
7946 7984
  * 
7947 7985
  *         if self._emu is NULL:             # <<<<<<<<<<<<<<
@@ -7951,23 +7989,23 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_37env_w32_hook_check(PyObject *__p
7951 7989
   __pyx_t_1 = (((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu == NULL);
7952 7990
   if (__pyx_t_1) {
7953 7991
 
7954  
-    /* "pylibemu.pyx":1167
  7992
+    /* "pylibemu.pyx":1171
7955 7993
  * 
7956 7994
  *         if self._emu is NULL:
7957 7995
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
7958 7996
  * 
7959 7997
  *         _env = emu_env_new(self._emu)
7960 7998
  */
7961  
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_72), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  7999
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7962 8000
     __Pyx_GOTREF(__pyx_t_2);
7963 8001
     __Pyx_Raise(__pyx_t_2, 0, 0);
7964 8002
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7965  
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  8003
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7966 8004
     goto __pyx_L5;
7967 8005
   }
7968 8006
   __pyx_L5:;
7969 8007
 
7970  
-  /* "pylibemu.pyx":1169
  8008
+  /* "pylibemu.pyx":1173
7971 8009
  *             raise RuntimeError('Emulator not initialized')
7972 8010
  * 
7973 8011
  *         _env = emu_env_new(self._emu)             # <<<<<<<<<<<<<<
@@ -7976,7 +8014,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_37env_w32_hook_check(PyObject *__p
7976 8014
  */
7977 8015
   __pyx_v__env = emu_env_new(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu);
7978 8016
 
7979  
-  /* "pylibemu.pyx":1170
  8017
+  /* "pylibemu.pyx":1174
7980 8018
  * 
7981 8019
  *         _env = emu_env_new(self._emu)
7982 8020
  *         if _env is NULL:             # <<<<<<<<<<<<<<
@@ -7986,35 +8024,35 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_37env_w32_hook_check(PyObject *__p
7986 8024
   __pyx_t_1 = (__pyx_v__env == NULL);
7987 8025
   if (__pyx_t_1) {
7988 8026
 
7989  
-    /* "pylibemu.pyx":1171
  8027
+    /* "pylibemu.pyx":1175
7990 8028
  *         _env = emu_env_new(self._emu)
7991 8029
  *         if _env is NULL:
7992 8030
  *             print emu_strerror(self._emu)             # <<<<<<<<<<<<<<
7993 8031
  *             raise RuntimeError('Emulator environment error')
7994 8032
  * 
7995 8033
  */
7996  
-    __pyx_t_2 = PyBytes_FromString(emu_strerror(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  8034
+    __pyx_t_2 = PyBytes_FromString(emu_strerror(((struct __pyx_obj_8pylibemu_Emulator *)__pyx_v_self)->_emu)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7997 8035
     __Pyx_GOTREF(((PyObject *)__pyx_t_2));
7998  
-    if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  8036
+    if (__Pyx_PrintOne(0, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
7999 8037
     __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8000 8038
 
8001  
-    /* "pylibemu.pyx":1172
  8039
+    /* "pylibemu.pyx":1176
8002 8040
  *         if _env is NULL:
8003 8041
  *             print emu_strerror(self._emu)
8004 8042
  *             raise RuntimeError('Emulator environment error')             # <<<<<<<<<<<<<<
8005 8043
  * 
8006 8044
  *         if emu_env_w32_eip_check(_env) is NULL:
8007 8045
  */
8008  
-    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_74), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  8046
+    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_76), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8009 8047
     __Pyx_GOTREF(__pyx_t_2);
8010 8048
     __Pyx_Raise(__pyx_t_2, 0, 0);
8011 8049
     __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8012  
-    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  8050
+    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8013 8051
     goto __pyx_L6;
8014 8052
   }
8015 8053
   __pyx_L6:;
8016 8054
 
8017  
-  /* "pylibemu.pyx":1174
  8055
+  /* "pylibemu.pyx":1178
8018 8056
  *             raise RuntimeError('Emulator environment error')
8019 8057
  * 
8020 8058
  *         if emu_env_w32_eip_check(_env) is NULL:             # <<<<<<<<<<<<<<
@@ -8024,7 +8062,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_37env_w32_hook_check(PyObject *__p
8024 8062
   __pyx_t_1 = (emu_env_w32_eip_check(__pyx_v__env) == NULL);
8025 8063
   if (__pyx_t_1) {
8026 8064
 
8027  
-    /* "pylibemu.pyx":1175
  8065
+    /* "pylibemu.pyx":1179
8028 8066
  * 
8029 8067
  *         if emu_env_w32_eip_check(_env) is NULL:
8030 8068
  *             return False             # <<<<<<<<<<<<<<
@@ -8032,7 +8070,7 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_37env_w32_hook_check(PyObject *__p
8032 8070
  *         return True
8033 8071
  */
8034 8072
     __Pyx_XDECREF(__pyx_r);
8035  
-    __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  8073
+    __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1179; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8036 8074
     __Pyx_GOTREF(__pyx_t_2);
8037 8075
     __pyx_r = __pyx_t_2;
8038 8076
     __pyx_t_2 = 0;
@@ -8041,13 +8079,13 @@ static PyObject *__pyx_pf_8pylibemu_8Emulator_37env_w32_hook_check(PyObject *__p
8041 8079
   }
8042 8080
   __pyx_L7:;
8043 8081
 
8044  
-  /* "pylibemu.pyx":1177
  8082
+  /* "pylibemu.pyx":1181
8045 8083
  *             return False
8046 8084
  * 
8047 8085
  *         return True             # <<<<<<<<<<<<<<
8048 8086
  */
8049 8087
   __Pyx_XDECREF(__pyx_r);
8050  
-  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  8088
+  __pyx_t_2 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8051 8089
   __Pyx_GOTREF(__pyx_t_2);
8052 8090
   __pyx_r = __pyx_t_2;
8053 8091
   __pyx_t_2 = 0;
@@ -8522,10 +8560,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = {
8522 8560
   {&__pyx_kp_s_64, __pyx_k_64, sizeof(__pyx_k_64), 0, 0, 1, 0},
8523 8561
   {&__pyx_kp_s_67, __pyx_k_67, sizeof(__pyx_k_67), 0, 0, 1, 0},
8524 8562
   {&__pyx_kp_s_69, __pyx_k_69, sizeof(__pyx_k_69), 0, 0, 1, 0},
8525  
-  {&__pyx_kp_s_73, __pyx_k_73, sizeof(__pyx_k_73), 0, 0, 1, 0},
  8563
+  {&__pyx_kp_s_71, __pyx_k_71, sizeof(__pyx_k_71), 0, 0, 1, 0},
8526 8564
   {&__pyx_kp_s_75, __pyx_k_75, sizeof(__pyx_k_75), 0, 0, 1, 0},
8527  
-  {&__pyx_kp_s_76, __pyx_k_76, sizeof(__pyx_k_76), 0, 0, 1, 0},
8528  
-  {&__pyx_n_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 1},
  8565
+  {&__pyx_kp_s_77, __pyx_k_77, sizeof(__pyx_k_77), 0, 0, 1, 0},
  8566
+  {&__pyx_kp_s_78, __pyx_k_78, sizeof(__pyx_k_78), 0, 0, 1, 0},
  8567
+  {&__pyx_n_s_79, __pyx_k_79, sizeof(__pyx_k_79), 0, 0, 1, 1},
8529 8568
   {&__pyx_n_s__EMU_REGS, __pyx_k__EMU_REGS, sizeof(__pyx_k__EMU_REGS), 0, 0, 1, 1},
8530 8569
   {&__pyx_n_s__Error, __pyx_k__Error, sizeof(__pyx_k__Error), 0, 0, 1, 1},
8531 8570
   {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
@@ -9023,7 +9062,7 @@ static int __Pyx_InitCachedConstants(void) {
9023 9062
  *         if self._emu is NULL:
9024 9063
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
9025 9064
  * 
9026  
- *         _mem = emu_memory_get(self._emu)
  9065
+ *         block = malloc(_len)
9027 9066
  */
9028 9067
   __pyx_k_tuple_66 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_66)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9029 9068
   __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_66));
@@ -9032,75 +9071,89 @@ static int __Pyx_InitCachedConstants(void) {
9032 9071
   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
9033 9072
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_66));
9034 9073
 
9035  
-  /* "pylibemu.pyx":1098
9036  
- * 
9037  
- *         if self._emu is NULL:
9038  
- *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
  9074
+  /* "pylibemu.pyx":1075
  9075
+ *         block = malloc(_len)
  9076
+ *         if block is NULL:
  9077
+ *             raise RuntimeError('Error while allocating memory')             # <<<<<<<<<<<<<<
9039 9078
  * 
9040 9079
  *         _mem = emu_memory_get(self._emu)
9041 9080
  */
9042  
-  __pyx_k_tuple_68 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1098; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9081
+  __pyx_k_tuple_68 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_68)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1075; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9043 9082
   __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_68));
9044  
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
9045  
-  PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_s_42));
9046  
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
  9083
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_67));
  9084
+  PyTuple_SET_ITEM(__pyx_k_tuple_68, 0, ((PyObject *)__pyx_kp_s_67));
  9085
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_67));
9047 9086
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_68));
9048 9087
 
9049  
-  /* "pylibemu.pyx":1124
  9088
+  /* "pylibemu.pyx":1102
9050 9089
  * 
9051 9090
  *         if self._emu is NULL:
9052 9091
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
9053 9092
  * 
9054 9093
  *         _mem = emu_memory_get(self._emu)
9055 9094
  */
9056  
-  __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9095
+  __pyx_k_tuple_70 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_70)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9057 9096
   __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_70));
9058 9097
   __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
9059 9098
   PyTuple_SET_ITEM(__pyx_k_tuple_70, 0, ((PyObject *)__pyx_kp_s_42));
9060 9099
   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
9061 9100
   __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_70));
9062 9101
 
9063  
-  /* "pylibemu.pyx":1147
  9102
+  /* "pylibemu.pyx":1128
9064 9103
  * 
9065 9104
  *         if self._emu is NULL:
9066 9105
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
9067 9106
  * 
9068 9107
  *         _mem = emu_memory_get(self._emu)
9069 9108
  */
9070  
-  __pyx_k_tuple_71 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_71)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9071  
-  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_71));
  9109
+  __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9110
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_72));
9072 9111
   __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
9073  
-  PyTuple_SET_ITEM(__pyx_k_tuple_71, 0, ((PyObject *)__pyx_kp_s_42));
  9112
+  PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_kp_s_42));
9074 9113
   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
9075  
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_71));
  9114
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
9076 9115
 
9077  
-  /* "pylibemu.pyx":1167
  9116
+  /* "pylibemu.pyx":1151
  9117
+ * 
  9118
+ *         if self._emu is NULL:
  9119
+ *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
  9120
+ * 
  9121
+ *         _mem = emu_memory_get(self._emu)
  9122
+ */
  9123
+  __pyx_k_tuple_73 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_73)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9124
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_73));
  9125
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
  9126
+  PyTuple_SET_ITEM(__pyx_k_tuple_73, 0, ((PyObject *)__pyx_kp_s_42));
  9127
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
  9128
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_73));
  9129
+
  9130
+  /* "pylibemu.pyx":1171
9078 9131
  * 
9079 9132
  *         if self._emu is NULL:
9080 9133
  *             raise RuntimeError('Emulator not initialized')             # <<<<<<<<<<<<<<
9081 9134
  * 
9082 9135
  *         _env = emu_env_new(self._emu)
9083 9136
  */
9084  
-  __pyx_k_tuple_72 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_72)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9085  
-  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_72));
  9137
+  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9138
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_74));
9086 9139
   __Pyx_INCREF(((PyObject *)__pyx_kp_s_42));
9087  
-  PyTuple_SET_ITEM(__pyx_k_tuple_72, 0, ((PyObject *)__pyx_kp_s_42));
  9140
+  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_kp_s_42));
9088 9141
   __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_42));
9089  
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_72));
  9142
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
9090 9143
 
9091  
-  /* "pylibemu.pyx":1172
  9144
+  /* "pylibemu.pyx":1176
9092 9145
  *         if _env is NULL:
9093 9146
  *             print emu_strerror(self._emu)
9094 9147
  *             raise RuntimeError('Emulator environment error')             # <<<<<<<<<<<<<<
9095 9148
  * 
9096 9149
  *         if emu_env_w32_eip_check(_env) is NULL:
9097 9150
  */
9098  
-  __pyx_k_tuple_74 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_74)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9099  
-  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_74));
9100  
-  __Pyx_INCREF(((PyObject *)__pyx_kp_s_73));
9101  
-  PyTuple_SET_ITEM(__pyx_k_tuple_74, 0, ((PyObject *)__pyx_kp_s_73));
9102  
-  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_73));
9103  
-  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_74));
  9151
+  __pyx_k_tuple_76 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_76)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1176; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9152
+  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_76));
  9153
+  __Pyx_INCREF(((PyObject *)__pyx_kp_s_75));
  9154
+  PyTuple_SET_ITEM(__pyx_k_tuple_76, 0, ((PyObject *)__pyx_kp_s_75));
  9155
+  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_75));
  9156
+  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_76));
9104 9157
   __Pyx_RefNannyFinishContext();
9105 9158
   return 0;
9106 9159
   __pyx_L1_error:;
@@ -9300,8 +9353,8 @@ PyMODINIT_FUNC PyInit_pylibemu(void)
9300 9353
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9301 9354
   __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9302 9355
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
9303  
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_kp_s_75)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9304  
-  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__datefmt), ((PyObject *)__pyx_kp_s_76)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9356
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_kp_s_77)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9357
+  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__datefmt), ((PyObject *)__pyx_kp_s_78)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9305 9358
   __pyx_t_3 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9306 9359
   __Pyx_GOTREF(__pyx_t_3);
9307 9360
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -9452,7 +9505,7 @@ PyMODINIT_FUNC PyInit_pylibemu(void)
9452 9505
  *         return self.emu_profile.truncate
9453 9506
  * 
9454 9507
  */
9455  
-  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_8pylibemu_Emulator, __pyx_n_s_77); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9508
+  __pyx_t_3 = __Pyx_GetName((PyObject *)__pyx_ptype_8pylibemu_Emulator, __pyx_n_s_79); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9456 9509
   __Pyx_GOTREF(__pyx_t_3);
9457 9510
   __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9458 9511
   __Pyx_GOTREF(((PyObject *)__pyx_t_1));
@@ -9462,7 +9515,7 @@ PyMODINIT_FUNC PyInit_pylibemu(void)
9462 9515
   __pyx_t_3 = PyObject_Call(__pyx_builtin_property, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 593; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9463 9516
   __Pyx_GOTREF(__pyx_t_3);
9464 9517
   __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
9465  
-  if (PyDict_SetItem((PyObject *)__pyx_ptype_8pylibemu_Emulator->tp_dict, __pyx_n_s_77, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  9518
+  if (PyDict_SetItem((PyObject *)__pyx_ptype_8pylibemu_Emulator->tp_dict, __pyx_n_s_79, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
9466 9519
   __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9467 9520
   PyType_Modified(__pyx_ptype_8pylibemu_Emulator);
9468 9521
 

0 notes on commit 85040a2

Please sign in to comment.
Something went wrong with that request. Please try again.