itextomml 1.5.2 → 1.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f52f4b4c76ab944e65193020f59e2b099e6f5c2d
4
- data.tar.gz: dd3134aac7bd23cc6f83c1f65529c61f35358e09
3
+ metadata.gz: 3721073b5fab0050aa3cfbf23646e76aa3008db5
4
+ data.tar.gz: 100a07681bb382fa05ee4331ece4adfa6d8072a6
5
5
  SHA512:
6
- metadata.gz: 1766a10989d67cfec9b950c6b53225bb75b646031f35df5f9c4ac021556c19bd3dc7b0c77763c525e98faf595d0c777b8e1c44e3dc2d4e0922c7b769df9f7da8
7
- data.tar.gz: 3a2465034a618d3c749f307dc96ed7091aa30f91d227526783dce4af7bf34fee24e0da12b258e2bea889fcfd6de452e504ea6fac0fa658d430eb0799d8bed1f7
6
+ metadata.gz: d4be683a9a9bc2e1aae3f26dba6a9e9d9acf5e09a80e627d8a679beae2b3c7e34479717ab0eaf875f78811a9abca2bd24a797853b85e7713dd86bcc14ecb502c
7
+ data.tar.gz: ff7d4ccf7564d32d3e62ac7eef02e7cb0bdeb253a00abd65a56e95fe66e3195f2b01d7e55406bb4a25e28099004b9899c76c259b95300f8afbcca908c9b11fe5
@@ -1,11 +1,11 @@
1
- /* itex2MML 1.5.2
2
- * itex2MML.h last modified 6/13/2014
1
+ /* itex2MML 1.5.3
2
+ * itex2MML.h last modified 8/13/2016
3
3
  */
4
4
 
5
5
  #ifndef ITEX2MML_H
6
6
  #define ITEX2MML_H
7
7
 
8
- #define ITEX2MML_VERSION "1.5.2"
8
+ #define ITEX2MML_VERSION "1.5.3"
9
9
 
10
10
  #ifdef __cplusplus
11
11
  extern "C" {
@@ -13,7 +13,7 @@ extern "C" {
13
13
 
14
14
  /* Step 1. Parse a buffer with itex source; return value is mathml, or 0 on failure (e.g., parse error).
15
15
  */
16
- extern char * itex2MML_parse (const char * buffer, unsigned long length);
16
+ extern char * itex2MML_parse (const char * buffer, size_t length);
17
17
 
18
18
  /* Step 2. Free the string from Step 1.
19
19
  */
@@ -22,24 +22,24 @@ extern "C" {
22
22
 
23
23
  /* Alternatively, to filter generic source and converting embedded equations, use:
24
24
  */
25
- extern int itex2MML_filter (const char * buffer, unsigned long length);
25
+ extern int itex2MML_filter (const char * buffer, size_t length);
26
26
 
27
- extern int itex2MML_html_filter (const char * buffer, unsigned long length);
28
- extern int itex2MML_strict_html_filter (const char * buffer, unsigned long length);
27
+ extern int itex2MML_html_filter (const char * buffer, size_t length);
28
+ extern int itex2MML_strict_html_filter (const char * buffer, size_t length);
29
29
 
30
30
 
31
31
  /* To change output methods:
32
32
  *
33
33
  * Note: If length is 0, then buffer is treated like a string; otherwise only length bytes are written.
34
34
  */
35
- extern void (*itex2MML_write) (const char * buffer, unsigned long length); /* default writes to stdout */
35
+ extern void (*itex2MML_write) (const char * buffer, size_t length); /* default writes to stdout */
36
36
  extern void (*itex2MML_write_mathml) (const char * mathml); /* default calls itex2MML_write(mathml,0) */
37
37
  extern void (*itex2MML_error) (const char * msg); /* default writes to stderr */
38
38
 
39
39
 
40
40
  /* Other stuff:
41
41
  */
42
- extern void itex2MML_setup (const char * buffer, unsigned long length);
42
+ extern void itex2MML_setup (const char * buffer, size_t length);
43
43
 
44
44
  extern void itex2MML_restart ();
45
45
 
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 3.0.0
3
+ * Version 3.0.8
4
4
  *
5
5
  * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -8,7 +8,11 @@
8
8
  * interface file instead.
9
9
  * ----------------------------------------------------------------------------- */
10
10
 
11
+
12
+ #ifndef SWIGRUBY
11
13
  #define SWIGRUBY
14
+ #endif
15
+
12
16
 
13
17
  /* -----------------------------------------------------------------------------
14
18
  * This section contains generic SWIG labels for method/variable
@@ -118,6 +122,19 @@
118
122
  # define _SCL_SECURE_NO_DEPRECATE
119
123
  #endif
120
124
 
125
+ /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
126
+ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
127
+ # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
128
+ #endif
129
+
130
+ /* Intel's compiler complains if a variable which was never initialised is
131
+ * cast to void, which is a common idiom which we use to indicate that we
132
+ * are aware a variable isn't used. So we just silence that warning.
133
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
134
+ */
135
+ #ifdef __INTEL_COMPILER
136
+ # pragma warning disable 592
137
+ #endif
121
138
 
122
139
  /* -----------------------------------------------------------------------------
123
140
  * This section contains generic SWIG labels for method/variable
@@ -227,6 +244,19 @@
227
244
  # define _SCL_SECURE_NO_DEPRECATE
228
245
  #endif
229
246
 
247
+ /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
248
+ #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
249
+ # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
250
+ #endif
251
+
252
+ /* Intel's compiler complains if a variable which was never initialised is
253
+ * cast to void, which is a common idiom which we use to indicate that we
254
+ * are aware a variable isn't used. So we just silence that warning.
255
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
256
+ */
257
+ #ifdef __INTEL_COMPILER
258
+ # pragma warning disable 592
259
+ #endif
230
260
 
231
261
  /* -----------------------------------------------------------------------------
232
262
  * swigrun.swg
@@ -1144,6 +1174,11 @@ void Ruby_Format_OverloadedError(
1144
1174
  extern "C" {
1145
1175
  #endif
1146
1176
 
1177
+ #if !defined(ST_DATA_T_DEFINED)
1178
+ /* Needs to be explicitly included for Ruby 1.8 and earlier */
1179
+ #include <st.h>
1180
+ #endif
1181
+
1147
1182
  /* Ruby 1.8 actually assumes the first case. */
1148
1183
  #if SIZEOF_VOIDP == SIZEOF_LONG
1149
1184
  # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
@@ -1155,19 +1190,19 @@ extern "C" {
1155
1190
  # error sizeof(void*) is not the same as long or long long
1156
1191
  #endif
1157
1192
 
1158
-
1159
- /* Global Ruby hash table to store Trackings from C/C++
1193
+ /* Global hash table to store Trackings from C/C++
1160
1194
  structs to Ruby Objects.
1161
1195
  */
1162
- static VALUE swig_ruby_trackings = Qnil;
1196
+ static st_table* swig_ruby_trackings = NULL;
1197
+
1198
+ static VALUE swig_ruby_trackings_count(ANYARGS) {
1199
+ return SWIG2NUM(swig_ruby_trackings->num_entries);
1200
+ }
1163
1201
 
1164
- /* Global variable that stores a reference to the ruby
1165
- hash table delete function. */
1166
- static ID swig_ruby_hash_delete;
1167
1202
 
1168
- /* Setup a Ruby hash table to store Trackings */
1203
+ /* Setup a hash table to store Trackings */
1169
1204
  SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1170
- /* Create a ruby hash table to store Trackings from C++
1205
+ /* Create a hash table to store Trackings from C++
1171
1206
  objects to Ruby objects. */
1172
1207
 
1173
1208
  /* Try to see if some other .so has already created a
@@ -1176,88 +1211,46 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1176
1211
  This is done to allow multiple DSOs to share the same
1177
1212
  tracking table.
1178
1213
  */
1179
- ID trackings_id = rb_intern( "@__trackings__" );
1214
+ VALUE trackings_value = Qnil;
1215
+ /* change the variable name so that we can mix modules
1216
+ compiled with older SWIG's - this used to be called "@__trackings__" */
1217
+ ID trackings_id = rb_intern( "@__safetrackings__" );
1180
1218
  VALUE verbose = rb_gv_get("VERBOSE");
1181
1219
  rb_gv_set("VERBOSE", Qfalse);
1182
- swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
1220
+ trackings_value = rb_ivar_get( _mSWIG, trackings_id );
1183
1221
  rb_gv_set("VERBOSE", verbose);
1184
1222
 
1185
- /* No, it hasn't. Create one ourselves */
1186
- if ( swig_ruby_trackings == Qnil )
1187
- {
1188
- swig_ruby_trackings = rb_hash_new();
1189
- rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
1190
- }
1191
-
1192
- /* Now store a reference to the hash table delete function
1193
- so that we only have to look it up once.*/
1194
- swig_ruby_hash_delete = rb_intern("delete");
1195
- }
1196
-
1197
- /* Get a Ruby number to reference a pointer */
1198
- SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1199
- /* We cast the pointer to an unsigned long
1200
- and then store a reference to it using
1201
- a Ruby number object. */
1202
-
1203
- /* Convert the pointer to a Ruby number */
1204
- return SWIG2NUM(ptr);
1205
- }
1206
-
1207
- /* Get a Ruby number to reference an object */
1208
- SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1209
- /* We cast the object to an unsigned long
1210
- and then store a reference to it using
1211
- a Ruby number object. */
1212
-
1213
- /* Convert the Object to a Ruby number */
1214
- return SWIG2NUM(object);
1215
- }
1216
-
1217
- /* Get a Ruby object from a previously stored reference */
1218
- SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1219
- /* The provided Ruby number object is a reference
1220
- to the Ruby object we want.*/
1223
+ /* The trick here is that we have to store the hash table
1224
+ pointer in a Ruby variable. We do not want Ruby's GC to
1225
+ treat this pointer as a Ruby object, so we convert it to
1226
+ a Ruby numeric value. */
1227
+ if (trackings_value == Qnil) {
1228
+ /* No, it hasn't. Create one ourselves */
1229
+ swig_ruby_trackings = st_init_numtable();
1230
+ rb_ivar_set( _mSWIG, trackings_id, SWIG2NUM(swig_ruby_trackings) );
1231
+ } else {
1232
+ swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
1233
+ }
1221
1234
 
1222
- /* Convert the Ruby number to a Ruby object */
1223
- return NUM2SWIG(reference);
1235
+ rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL);
1224
1236
  }
1225
1237
 
1226
1238
  /* Add a Tracking from a C/C++ struct to a Ruby object */
1227
1239
  SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) {
1228
- /* In a Ruby hash table we store the pointer and
1229
- the associated Ruby object. The trick here is
1230
- that we cannot store the Ruby object directly - if
1231
- we do then it cannot be garbage collected. So
1232
- instead we typecast it as a unsigned long and
1233
- convert it to a Ruby number object.*/
1234
-
1235
- /* Get a reference to the pointer as a Ruby number */
1236
- VALUE key = SWIG_RubyPtrToReference(ptr);
1237
-
1238
- /* Get a reference to the Ruby object as a Ruby number */
1239
- VALUE value = SWIG_RubyObjectToReference(object);
1240
-
1241
1240
  /* Store the mapping to the global hash table. */
1242
- rb_hash_aset(swig_ruby_trackings, key, value);
1241
+ st_insert(swig_ruby_trackings, (st_data_t)ptr, object);
1243
1242
  }
1244
1243
 
1245
1244
  /* Get the Ruby object that owns the specified C/C++ struct */
1246
1245
  SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1247
- /* Get a reference to the pointer as a Ruby number */
1248
- VALUE key = SWIG_RubyPtrToReference(ptr);
1249
-
1250
1246
  /* Now lookup the value stored in the global hash table */
1251
- VALUE value = rb_hash_aref(swig_ruby_trackings, key);
1252
-
1253
- if (value == Qnil) {
1254
- /* No object exists - return nil. */
1247
+ VALUE value;
1248
+
1249
+ if (st_lookup(swig_ruby_trackings, (st_data_t)ptr, &value)) {
1250
+ return value;
1251
+ } else {
1255
1252
  return Qnil;
1256
1253
  }
1257
- else {
1258
- /* Convert this value to Ruby object */
1259
- return SWIG_RubyReferenceToObject(value);
1260
- }
1261
1254
  }
1262
1255
 
1263
1256
  /* Remove a Tracking from a C/C++ struct to a Ruby object. It
@@ -1265,12 +1258,8 @@ SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) {
1265
1258
  since the same memory address may be reused later to create
1266
1259
  a new object. */
1267
1260
  SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1268
- /* Get a reference to the pointer as a Ruby number */
1269
- VALUE key = SWIG_RubyPtrToReference(ptr);
1270
-
1271
- /* Delete the object from the hash table by calling Ruby's
1272
- do this we need to call the Hash.delete method.*/
1273
- rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key);
1261
+ /* Delete the object from the hash table */
1262
+ st_delete(swig_ruby_trackings, (st_data_t *)&ptr, NULL);
1274
1263
  }
1275
1264
 
1276
1265
  /* This is a helper method that unlinks a Ruby object from its
@@ -1280,10 +1269,25 @@ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1280
1269
  VALUE object = SWIG_RubyInstanceFor(ptr);
1281
1270
 
1282
1271
  if (object != Qnil) {
1272
+ if (TYPE(object) != T_DATA)
1273
+ abort();
1283
1274
  DATA_PTR(object) = 0;
1284
1275
  }
1285
1276
  }
1286
1277
 
1278
+ /* This is a helper method that iterates over all the trackings
1279
+ passing the C++ object pointer and its related Ruby object
1280
+ to the passed callback function. */
1281
+
1282
+ /* Proxy method to abstract the internal trackings datatype */
1283
+ static int swig_ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) {
1284
+ (*meth)(ptr, obj);
1285
+ return ST_CONTINUE;
1286
+ }
1287
+
1288
+ SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
1289
+ st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&swig_ruby_internal_iterate_callback, (st_data_t)meth);
1290
+ }
1287
1291
 
1288
1292
  #ifdef __cplusplus
1289
1293
  }
@@ -1342,7 +1346,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1342
1346
  #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1343
1347
  #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags)
1344
1348
  #define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own)
1345
- #define swig_owntype ruby_owntype
1349
+ #define swig_owntype swig_ruby_owntype
1346
1350
 
1347
1351
  /* for raw packed data */
1348
1352
  #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)
@@ -1566,22 +1570,24 @@ SWIG_Ruby_MangleStr(VALUE obj)
1566
1570
  }
1567
1571
 
1568
1572
  /* Acquire a pointer value */
1569
- typedef void (*ruby_owntype)(void*);
1573
+ typedef struct {
1574
+ void (*datafree)(void *);
1575
+ int own;
1576
+ } swig_ruby_owntype;
1570
1577
 
1571
- SWIGRUNTIME ruby_owntype
1572
- SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) {
1578
+ SWIGRUNTIME swig_ruby_owntype
1579
+ SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
1580
+ swig_ruby_owntype oldown = {0, 0};
1573
1581
  if (obj) {
1574
- ruby_owntype oldown = RDATA(obj)->dfree;
1575
- RDATA(obj)->dfree = own;
1576
- return oldown;
1577
- } else {
1578
- return 0;
1582
+ oldown.datafree = RDATA(obj)->dfree;
1583
+ RDATA(obj)->dfree = own.datafree;
1579
1584
  }
1585
+ return oldown;
1580
1586
  }
1581
1587
 
1582
1588
  /* Convert a pointer value */
1583
1589
  SWIGRUNTIME int
1584
- SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own)
1590
+ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, swig_ruby_owntype *own)
1585
1591
  {
1586
1592
  char *c;
1587
1593
  swig_cast_info *tc;
@@ -1589,7 +1595,8 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1589
1595
 
1590
1596
  /* Grab the pointer */
1591
1597
  if (NIL_P(obj)) {
1592
- *ptr = 0;
1598
+ if (ptr)
1599
+ *ptr = 0;
1593
1600
  return SWIG_OK;
1594
1601
  } else {
1595
1602
  if (TYPE(obj) != T_DATA) {
@@ -1598,7 +1605,10 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1598
1605
  Data_Get_Struct(obj, void, vptr);
1599
1606
  }
1600
1607
 
1601
- if (own) *own = RDATA(obj)->dfree;
1608
+ if (own) {
1609
+ own->datafree = RDATA(obj)->dfree;
1610
+ own->own = 0;
1611
+ }
1602
1612
 
1603
1613
  /* Check to see if the input object is giving up ownership
1604
1614
  of the underlying C struct or C++ object. If so then we
@@ -1627,16 +1637,6 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1627
1637
 
1628
1638
  /* Do type-checking if type info was provided */
1629
1639
  if (ty) {
1630
- if (ty->clientdata) {
1631
- if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1632
- if (vptr == 0) {
1633
- /* The object has already been deleted */
1634
- return SWIG_ObjectPreviouslyDeletedError;
1635
- }
1636
- *ptr = vptr;
1637
- return SWIG_OK;
1638
- }
1639
- }
1640
1640
  if ((c = SWIG_MangleStr(obj)) == NULL) {
1641
1641
  return SWIG_ERROR;
1642
1642
  }
@@ -1644,12 +1644,27 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1644
1644
  if (!tc) {
1645
1645
  return SWIG_ERROR;
1646
1646
  } else {
1647
- int newmemory = 0;
1648
- *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1649
- assert(!newmemory); /* newmemory handling not yet implemented */
1647
+ if (vptr == 0) {
1648
+ /* The object has already been deleted */
1649
+ return SWIG_ObjectPreviouslyDeletedError;
1650
+ }
1651
+ if (ptr) {
1652
+ if (tc->type == ty) {
1653
+ *ptr = vptr;
1654
+ } else {
1655
+ int newmemory = 0;
1656
+ *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1657
+ if (newmemory == SWIG_CAST_NEW_MEMORY) {
1658
+ assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1659
+ if (own)
1660
+ own->own = own->own | SWIG_CAST_NEW_MEMORY;
1661
+ }
1662
+ }
1663
+ }
1650
1664
  }
1651
1665
  } else {
1652
- *ptr = vptr;
1666
+ if (ptr)
1667
+ *ptr = vptr;
1653
1668
  }
1654
1669
 
1655
1670
  return SWIG_OK;
@@ -1722,7 +1737,7 @@ SWIGRUNTIME void
1722
1737
  SWIG_Ruby_SetModule(swig_module_info *pointer)
1723
1738
  {
1724
1739
  /* register a new class */
1725
- VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1740
+ VALUE cl = rb_define_class("Swig_runtime_data", rb_cObject);
1726
1741
  /* create and store the structure pointer to a global variable */
1727
1742
  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1728
1743
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
@@ -1794,7 +1809,7 @@ static VALUE mItex2MML;
1794
1809
  #define SWIG_RUBY_THREAD_END_BLOCK
1795
1810
 
1796
1811
 
1797
- #define SWIGVERSION 0x030000
1812
+ #define SWIGVERSION 0x030008
1798
1813
  #define SWIG_VERSION SWIGVERSION
1799
1814
 
1800
1815
 
@@ -1863,7 +1878,7 @@ SWIG_ruby_failed(void)
1863
1878
  }
1864
1879
 
1865
1880
 
1866
- /*@SWIG:/sw/share/swig/3.0.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1881
+ /*@SWIG:/sw/share/swig/3.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1867
1882
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1868
1883
  {
1869
1884
  VALUE obj = args[0];
@@ -1892,6 +1907,16 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
1892
1907
  }
1893
1908
 
1894
1909
 
1910
+ SWIGINTERNINLINE int
1911
+ SWIG_AsVal_size_t (VALUE obj, size_t *val)
1912
+ {
1913
+ unsigned long v;
1914
+ int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
1915
+ if (SWIG_IsOK(res) && val) *val = (size_t)(v);
1916
+ return res;
1917
+ }
1918
+
1919
+
1895
1920
  #include <limits.h>
1896
1921
  #if !defined(SWIG_NO_LLONG_MAX)
1897
1922
  # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
@@ -1938,11 +1963,11 @@ SWIG_FromCharPtr(const char *cptr)
1938
1963
  SWIGINTERN VALUE
1939
1964
  _wrap_itex2MML_filter(int argc, VALUE *argv, VALUE self) {
1940
1965
  char *arg1 = (char *) 0 ;
1941
- unsigned long arg2 ;
1966
+ size_t arg2 ;
1942
1967
  int res1 ;
1943
1968
  char *buf1 = 0 ;
1944
1969
  int alloc1 = 0 ;
1945
- unsigned long val2 ;
1970
+ size_t val2 ;
1946
1971
  int ecode2 = 0 ;
1947
1972
  int result;
1948
1973
  VALUE vresult = Qnil;
@@ -1955,11 +1980,11 @@ _wrap_itex2MML_filter(int argc, VALUE *argv, VALUE self) {
1955
1980
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","itex2MML_filter", 1, argv[0] ));
1956
1981
  }
1957
1982
  arg1 = (char *)(buf1);
1958
- ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
1983
+ ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
1959
1984
  if (!SWIG_IsOK(ecode2)) {
1960
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned long","itex2MML_filter", 2, argv[1] ));
1985
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","itex2MML_filter", 2, argv[1] ));
1961
1986
  }
1962
- arg2 = (unsigned long)(val2);
1987
+ arg2 = (size_t)(val2);
1963
1988
  result = (int)itex2MML_filter((char const *)arg1,arg2);
1964
1989
  vresult = SWIG_From_int((int)(result));
1965
1990
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
@@ -1973,11 +1998,11 @@ fail:
1973
1998
  SWIGINTERN VALUE
1974
1999
  _wrap_itex2MML_html_filter(int argc, VALUE *argv, VALUE self) {
1975
2000
  char *arg1 = (char *) 0 ;
1976
- unsigned long arg2 ;
2001
+ size_t arg2 ;
1977
2002
  int res1 ;
1978
2003
  char *buf1 = 0 ;
1979
2004
  int alloc1 = 0 ;
1980
- unsigned long val2 ;
2005
+ size_t val2 ;
1981
2006
  int ecode2 = 0 ;
1982
2007
  int result;
1983
2008
  VALUE vresult = Qnil;
@@ -1990,11 +2015,11 @@ _wrap_itex2MML_html_filter(int argc, VALUE *argv, VALUE self) {
1990
2015
  SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "char const *","itex2MML_html_filter", 1, argv[0] ));
1991
2016
  }
1992
2017
  arg1 = (char *)(buf1);
1993
- ecode2 = SWIG_AsVal_unsigned_SS_long(argv[1], &val2);
2018
+ ecode2 = SWIG_AsVal_size_t(argv[1], &val2);
1994
2019
  if (!SWIG_IsOK(ecode2)) {
1995
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "unsigned long","itex2MML_html_filter", 2, argv[1] ));
2020
+ SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "size_t","itex2MML_html_filter", 2, argv[1] ));
1996
2021
  }
1997
- arg2 = (unsigned long)(val2);
2022
+ arg2 = (size_t)(val2);
1998
2023
  result = (int)itex2MML_html_filter((char const *)arg1,arg2);
1999
2024
  vresult = SWIG_From_int((int)(result));
2000
2025
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
@@ -2096,7 +2121,7 @@ SWIGRUNTIME void
2096
2121
  SWIG_InitializeModule(void *clientdata) {
2097
2122
  size_t i;
2098
2123
  swig_module_info *module_head, *iter;
2099
- int found, init;
2124
+ int init;
2100
2125
 
2101
2126
  /* check to see if the circular list has been setup, if not, set it up */
2102
2127
  if (swig_module.next==0) {
@@ -2115,22 +2140,18 @@ SWIG_InitializeModule(void *clientdata) {
2115
2140
  /* This is the first module loaded for this interpreter */
2116
2141
  /* so set the swig module into the interpreter */
2117
2142
  SWIG_SetModule(clientdata, &swig_module);
2118
- module_head = &swig_module;
2119
2143
  } else {
2120
2144
  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
2121
- found=0;
2122
2145
  iter=module_head;
2123
2146
  do {
2124
2147
  if (iter==&swig_module) {
2125
- found=1;
2126
- break;
2148
+ /* Our module is already in the list, so there's nothing more to do. */
2149
+ return;
2127
2150
  }
2128
2151
  iter=iter->next;
2129
2152
  } while (iter!= module_head);
2130
2153
 
2131
- /* if the is found in the list, then all is done and we may leave */
2132
- if (found) return;
2133
- /* otherwise we must add out module into the list */
2154
+ /* otherwise we must add our module into the list */
2134
2155
  swig_module.next = module_head->next;
2135
2156
  module_head->next = &swig_module;
2136
2157
  }