fxruby 1.6.50 → 1.6.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.github/workflows/binary.yml +17 -0
  4. data/.github/workflows/ci.yml +13 -2
  5. data/Gemfile +7 -2
  6. data/History.md +14 -0
  7. data/Rakefile +28 -46
  8. data/doap.rdf +2 -2
  9. data/docs/Fox/Canvas/CanvasError.html +2 -2
  10. data/docs/Fox/Canvas/CircleShape.html +2 -2
  11. data/docs/Fox/Canvas/ImageShape.html +2 -2
  12. data/docs/Fox/Canvas/LineShape.html +2 -2
  13. data/docs/Fox/Canvas/PolygonShape.html +2 -2
  14. data/docs/Fox/Canvas/RectangleShape.html +2 -2
  15. data/docs/Fox/Canvas/SelectionPolicy.html +2 -2
  16. data/docs/Fox/Canvas/Shape.html +3 -3
  17. data/docs/Fox/Canvas/ShapeCanvas.html +2 -2
  18. data/docs/Fox/Canvas/ShapeGroup.html +2 -2
  19. data/docs/Fox/Canvas/SingleSelectionPolicy.html +2 -2
  20. data/docs/Fox/Canvas/TextShape.html +7 -9
  21. data/docs/Fox/Canvas.html +3 -3
  22. data/docs/Fox/FTNonModal.html +2 -2
  23. data/docs/Fox/FX4Splitter.html +41 -41
  24. data/docs/Fox/FX7Segment.html +5 -5
  25. data/docs/Fox/FXAccelTable.html +2 -2
  26. data/docs/Fox/FXApp.html +54 -54
  27. data/docs/Fox/FXArc.html +2 -2
  28. data/docs/Fox/FXArrowButton.html +22 -22
  29. data/docs/Fox/FXBMPIcon.html +10 -10
  30. data/docs/Fox/FXBMPImage.html +9 -9
  31. data/docs/Fox/FXBitmap.html +7 -7
  32. data/docs/Fox/FXBitmapFrame.html +3 -3
  33. data/docs/Fox/FXBitmapView.html +4 -4
  34. data/docs/Fox/FXButton.html +21 -21
  35. data/docs/Fox/FXCURCursor.html +2 -2
  36. data/docs/Fox/FXCalendar.html +4 -4
  37. data/docs/Fox/FXCanvas.html +7 -7
  38. data/docs/Fox/FXCheckButton.html +13 -13
  39. data/docs/Fox/FXChoiceBox.html +20 -20
  40. data/docs/Fox/FXColor.html +2 -2
  41. data/docs/Fox/FXColorBar.html +10 -10
  42. data/docs/Fox/FXColorDialog.html +7 -7
  43. data/docs/Fox/FXColorItem.html +2 -2
  44. data/docs/Fox/FXColorList.html +2 -2
  45. data/docs/Fox/FXColorRing.html +7 -7
  46. data/docs/Fox/FXColorSelector.html +36 -36
  47. data/docs/Fox/FXColorWell.html +19 -19
  48. data/docs/Fox/FXColorWheel.html +20 -20
  49. data/docs/Fox/FXComboBox.html +31 -31
  50. data/docs/Fox/FXComboTableItem.html +2 -2
  51. data/docs/Fox/FXCommand.html +2 -2
  52. data/docs/Fox/FXComposite.html +5 -5
  53. data/docs/Fox/FXCursor.html +14 -14
  54. data/docs/Fox/FXDC.html +207 -207
  55. data/docs/Fox/FXDCPrint.html +2 -2
  56. data/docs/Fox/FXDCWindow.html +2 -2
  57. data/docs/Fox/FXDataTarget.html +8 -8
  58. data/docs/Fox/FXDebugTarget.html +3 -3
  59. data/docs/Fox/FXDelegator.html +2 -2
  60. data/docs/Fox/FXDial.html +28 -28
  61. data/docs/Fox/FXDialogBox.html +5 -5
  62. data/docs/Fox/FXDict.html +2 -2
  63. data/docs/Fox/FXDirBox.html +7 -7
  64. data/docs/Fox/FXDirDialog.html +2 -2
  65. data/docs/Fox/FXDirItem.html +2 -2
  66. data/docs/Fox/FXDirList.html +19 -19
  67. data/docs/Fox/FXDirSelector.html +15 -15
  68. data/docs/Fox/FXDockBar.html +27 -27
  69. data/docs/Fox/FXDockHandler.html +5 -5
  70. data/docs/Fox/FXDockSite.html +14 -14
  71. data/docs/Fox/FXDockTitle.html +2 -2
  72. data/docs/Fox/FXDocument.html +5 -5
  73. data/docs/Fox/FXDragCorner.html +2 -2
  74. data/docs/Fox/FXDrawable.html +5 -5
  75. data/docs/Fox/FXDriveBox.html +5 -5
  76. data/docs/Fox/FXEvent.html +62 -60
  77. data/docs/Fox/FXExtentd.html +2 -2
  78. data/docs/Fox/FXExtentf.html +2 -2
  79. data/docs/Fox/FXFileAssoc.html +2 -2
  80. data/docs/Fox/FXFileDialog.html +32 -32
  81. data/docs/Fox/FXFileDict.html +7 -7
  82. data/docs/Fox/FXFileItem.html +2 -2
  83. data/docs/Fox/FXFileList.html +27 -27
  84. data/docs/Fox/FXFileSelector.html +35 -35
  85. data/docs/Fox/FXFileStream.html +6 -6
  86. data/docs/Fox/FXFoldingItem.html +2 -2
  87. data/docs/Fox/FXFoldingList.html +41 -41
  88. data/docs/Fox/FXFont.html +172 -170
  89. data/docs/Fox/FXFontDesc.html +2 -2
  90. data/docs/Fox/FXFontDialog.html +2 -2
  91. data/docs/Fox/FXFontSelector.html +14 -14
  92. data/docs/Fox/FXFrame.html +4 -4
  93. data/docs/Fox/FXGIFCursor.html +2 -2
  94. data/docs/Fox/FXGIFIcon.html +10 -10
  95. data/docs/Fox/FXGIFImage.html +9 -9
  96. data/docs/Fox/FXGLCanvas.html +2 -2
  97. data/docs/Fox/FXGLCone.html +2 -2
  98. data/docs/Fox/FXGLContext.html +2 -2
  99. data/docs/Fox/FXGLCube.html +2 -2
  100. data/docs/Fox/FXGLCylinder.html +2 -2
  101. data/docs/Fox/FXGLGroup.html +2 -2
  102. data/docs/Fox/FXGLLine.html +2 -2
  103. data/docs/Fox/FXGLObject.html +14 -14
  104. data/docs/Fox/FXGLPoint.html +2 -2
  105. data/docs/Fox/FXGLShape.html +26 -26
  106. data/docs/Fox/FXGLSphere.html +2 -2
  107. data/docs/Fox/FXGLViewer.html +74 -74
  108. data/docs/Fox/FXGLVisual.html +2 -2
  109. data/docs/Fox/FXGradient.html +2 -2
  110. data/docs/Fox/FXGradientBar.html +34 -34
  111. data/docs/Fox/FXGroupBox.html +7 -7
  112. data/docs/Fox/FXHeader.html +20 -20
  113. data/docs/Fox/FXHeaderItem.html +19 -19
  114. data/docs/Fox/FXHiliteStyle.html +2 -2
  115. data/docs/Fox/FXHorizontalFrame.html +15 -15
  116. data/docs/Fox/FXHorizontalSeparator.html +13 -13
  117. data/docs/Fox/FXICOIcon.html +10 -10
  118. data/docs/Fox/FXICOImage.html +9 -9
  119. data/docs/Fox/FXIcon.html +10 -10
  120. data/docs/Fox/FXIconDict.html +2 -2
  121. data/docs/Fox/FXIconItem.html +2 -2
  122. data/docs/Fox/FXIconList.html +43 -43
  123. data/docs/Fox/FXIconSource.html +2 -2
  124. data/docs/Fox/FXId.html +2 -2
  125. data/docs/Fox/FXImage.html +120 -297
  126. data/docs/Fox/FXImageFrame.html +14 -14
  127. data/docs/Fox/FXImageView.html +13 -13
  128. data/docs/Fox/FXInputDialog.html +7 -7
  129. data/docs/Fox/FXIrb.html +2 -2
  130. data/docs/Fox/FXJPGIcon.html +11 -11
  131. data/docs/Fox/FXJPGImage.html +10 -10
  132. data/docs/Fox/FXKnob.html +17 -17
  133. data/docs/Fox/FXLabel.html +25 -25
  134. data/docs/Fox/FXLight.html +2 -2
  135. data/docs/Fox/FXList.html +29 -29
  136. data/docs/Fox/FXListBox.html +8 -8
  137. data/docs/Fox/FXListItem.html +2 -2
  138. data/docs/Fox/FXMDIChild.html +21 -21
  139. data/docs/Fox/FXMDIClient.html +224 -28
  140. data/docs/Fox/FXMDIDeleteButton.html +2 -2
  141. data/docs/Fox/FXMDIMaximizeButton.html +2 -2
  142. data/docs/Fox/FXMDIMenu.html +2 -2
  143. data/docs/Fox/FXMDIMinimizeButton.html +2 -2
  144. data/docs/Fox/FXMDIRestoreButton.html +2 -2
  145. data/docs/Fox/FXMDIWindowButton.html +2 -2
  146. data/docs/Fox/FXMainWindow.html +4 -4
  147. data/docs/Fox/FXMaterial.html +2 -2
  148. data/docs/Fox/FXMatrix.html +5 -5
  149. data/docs/Fox/FXMemoryBuffer.html +4 -4
  150. data/docs/Fox/FXMemoryStream.html +8 -8
  151. data/docs/Fox/FXMenuBar.html +2 -2
  152. data/docs/Fox/FXMenuButton.html +24 -24
  153. data/docs/Fox/FXMenuCaption.html +5 -5
  154. data/docs/Fox/FXMenuCascade.html +2 -2
  155. data/docs/Fox/FXMenuCheck.html +4 -4
  156. data/docs/Fox/FXMenuCommand.html +4 -4
  157. data/docs/Fox/FXMenuPane.html +2 -2
  158. data/docs/Fox/FXMenuRadio.html +4 -4
  159. data/docs/Fox/FXMenuSeparator.html +2 -2
  160. data/docs/Fox/FXMenuTitle.html +7 -7
  161. data/docs/Fox/FXMessageBox.html +21 -21
  162. data/docs/Fox/FXObject.html +2 -2
  163. data/docs/Fox/FXOption.html +8 -8
  164. data/docs/Fox/FXOptionMenu.html +8 -8
  165. data/docs/Fox/FXPCXIcon.html +10 -10
  166. data/docs/Fox/FXPCXImage.html +9 -9
  167. data/docs/Fox/FXPNGIcon.html +10 -10
  168. data/docs/Fox/FXPNGImage.html +9 -9
  169. data/docs/Fox/FXPPMIcon.html +10 -10
  170. data/docs/Fox/FXPPMImage.html +9 -9
  171. data/docs/Fox/FXPSBounds.html +2 -2
  172. data/docs/Fox/FXPacker.html +2 -2
  173. data/docs/Fox/FXPicker.html +5 -5
  174. data/docs/Fox/FXPopup.html +6 -6
  175. data/docs/Fox/FXPrintDialog.html +23 -23
  176. data/docs/Fox/FXPrinter.html +22 -22
  177. data/docs/Fox/FXProgressBar.html +8 -8
  178. data/docs/Fox/FXProgressDialog.html +6 -6
  179. data/docs/Fox/FXPseudoKeyboard.html +2 -2
  180. data/docs/Fox/FXPseudoMouse.html +2 -2
  181. data/docs/Fox/FXPseudoTarget.html +2 -2
  182. data/docs/Fox/FXQuatd.html +19 -19
  183. data/docs/Fox/FXQuatf.html +24 -24
  184. data/docs/Fox/FXRGBIcon.html +10 -10
  185. data/docs/Fox/FXRGBImage.html +9 -9
  186. data/docs/Fox/FXRadioButton.html +12 -12
  187. data/docs/Fox/FXRanged.html +2 -2
  188. data/docs/Fox/FXRangef.html +2 -2
  189. data/docs/Fox/FXRealSlider.html +40 -40
  190. data/docs/Fox/FXRealSpinner.html +32 -32
  191. data/docs/Fox/FXRecentFiles.html +17 -17
  192. data/docs/Fox/FXRectangle.html +15 -15
  193. data/docs/Fox/FXRegion.html +2 -2
  194. data/docs/Fox/FXRegistry.html +2 -2
  195. data/docs/Fox/FXReplaceDialog.html +29 -29
  196. data/docs/Fox/FXRootWindow.html +5 -5
  197. data/docs/Fox/FXRuler.html +31 -31
  198. data/docs/Fox/FXRulerView.html +2 -2
  199. data/docs/Fox/FXScintilla.html +9116 -2763
  200. data/docs/Fox/FXScrollArea.html +21 -21
  201. data/docs/Fox/FXScrollBar.html +31 -31
  202. data/docs/Fox/FXScrollCorner.html +2 -2
  203. data/docs/Fox/FXScrollPane.html +6 -6
  204. data/docs/Fox/FXScrollWindow.html +9 -9
  205. data/docs/Fox/FXSearchDialog.html +11 -11
  206. data/docs/Fox/FXSegment.html +2 -2
  207. data/docs/Fox/FXSeparator.html +7 -7
  208. data/docs/Fox/FXSettings.html +56 -56
  209. data/docs/Fox/FXShell.html +2 -2
  210. data/docs/Fox/FXShutter.html +24 -24
  211. data/docs/Fox/FXShutterItem.html +19 -19
  212. data/docs/Fox/FXSize.html +12 -12
  213. data/docs/Fox/FXSlider.html +40 -40
  214. data/docs/Fox/FXSphered.html +2 -2
  215. data/docs/Fox/FXSpheref.html +2 -2
  216. data/docs/Fox/FXSpinner.html +31 -31
  217. data/docs/Fox/FXSplashScreen.html +3 -3
  218. data/docs/Fox/FXSplashWindow.html +7 -7
  219. data/docs/Fox/FXSplitter.html +22 -22
  220. data/docs/Fox/FXSpring.html +17 -17
  221. data/docs/Fox/FXStatusBar.html +17 -17
  222. data/docs/Fox/FXStatusLine.html +8 -8
  223. data/docs/Fox/FXStream.html +26 -26
  224. data/docs/Fox/FXStreamAllocError.html +2 -2
  225. data/docs/Fox/FXStreamEndError.html +2 -2
  226. data/docs/Fox/FXStreamError.html +2 -2
  227. data/docs/Fox/FXStreamFailureError.html +2 -2
  228. data/docs/Fox/FXStreamFormatError.html +2 -2
  229. data/docs/Fox/FXStreamFullError.html +2 -2
  230. data/docs/Fox/FXStreamNoReadError.html +2 -2
  231. data/docs/Fox/FXStreamNoWriteError.html +2 -2
  232. data/docs/Fox/FXStreamUnknownError.html +2 -2
  233. data/docs/Fox/FXStringDict.html +2 -2
  234. data/docs/Fox/FXSwitcher.html +30 -30
  235. data/docs/Fox/FXTGAIcon.html +10 -10
  236. data/docs/Fox/FXTGAImage.html +9 -9
  237. data/docs/Fox/FXTIFIcon.html +10 -10
  238. data/docs/Fox/FXTIFImage.html +9 -9
  239. data/docs/Fox/FXTabBar.html +37 -37
  240. data/docs/Fox/FXTabBook.html +15 -15
  241. data/docs/Fox/FXTabItem.html +27 -27
  242. data/docs/Fox/FXTable.html +89 -89
  243. data/docs/Fox/FXTableItem.html +6 -6
  244. data/docs/Fox/FXTablePos.html +2 -2
  245. data/docs/Fox/FXTableRange.html +2 -2
  246. data/docs/Fox/FXText.html +115 -115
  247. data/docs/Fox/FXTextChange.html +2 -2
  248. data/docs/Fox/FXTextField.html +55 -55
  249. data/docs/Fox/FXToggleButton.html +31 -31
  250. data/docs/Fox/FXToolBar.html +15 -15
  251. data/docs/Fox/FXToolBarGrip.html +14 -14
  252. data/docs/Fox/FXToolBarShell.html +11 -11
  253. data/docs/Fox/FXToolBarTab.html +21 -21
  254. data/docs/Fox/FXToolTip.html +12 -10
  255. data/docs/Fox/FXTopWindow.html +34 -34
  256. data/docs/Fox/FXTranslator.html +2 -2
  257. data/docs/Fox/FXTreeItem.html +2 -2
  258. data/docs/Fox/FXTreeList.html +41 -41
  259. data/docs/Fox/FXTreeListBox.html +23 -23
  260. data/docs/Fox/FXTriStateButton.html +21 -21
  261. data/docs/Fox/FXUndoList.html +3 -3
  262. data/docs/Fox/FXVec2d.html +2 -2
  263. data/docs/Fox/FXVec2f.html +2 -2
  264. data/docs/Fox/FXVec3d.html +2 -2
  265. data/docs/Fox/FXVec3f.html +2 -2
  266. data/docs/Fox/FXVec4d.html +2 -2
  267. data/docs/Fox/FXVec4f.html +2 -2
  268. data/docs/Fox/FXVerticalFrame.html +15 -15
  269. data/docs/Fox/FXVerticalSeparator.html +13 -13
  270. data/docs/Fox/FXViewport.html +2 -2
  271. data/docs/Fox/FXVisual.html +24 -24
  272. data/docs/Fox/FXWindow.html +143 -143
  273. data/docs/Fox/FXWizard.html +5 -5
  274. data/docs/Fox/FXXBMIcon.html +11 -11
  275. data/docs/Fox/FXXBMImage.html +10 -10
  276. data/docs/Fox/FXXPMIcon.html +10 -10
  277. data/docs/Fox/FXXPMImage.html +9 -9
  278. data/docs/Fox/NotifyHeader.html +2 -2
  279. data/docs/Fox/SCNotification.html +2 -2
  280. data/docs/Fox/TextRange.html +2 -2
  281. data/docs/Fox.html +89 -89
  282. data/docs/IRB.html +2 -2
  283. data/docs/Responder.html +2 -2
  284. data/docs/Responder2.html +2 -2
  285. data/docs/_index.html +2 -2
  286. data/docs/css/style.css +2 -15
  287. data/docs/file.History.html +1432 -842
  288. data/docs/file.README.html +9 -9
  289. data/docs/index.html +94 -53
  290. data/docs/js/app.js +91 -40
  291. data/docs/js/full_list.js +22 -20
  292. data/docs/method_list.html +2854 -2286
  293. data/docs/top-level-namespace.html +2 -2
  294. data/examples/canvasdemo.rb +4 -4
  295. data/examples/iconlist.rb +79 -4
  296. data/examples/inputs.rb +1 -1
  297. data/examples/rmagick.rb +9 -9
  298. data/ext/fox16_c/FXRbApp.cpp +2 -1
  299. data/ext/fox16_c/FXRbDataTarget.cpp +1 -0
  300. data/ext/fox16_c/FXRbGLViewer.cpp +1 -0
  301. data/ext/fox16_c/FXRbObjRegistry.cpp +12 -5
  302. data/ext/fox16_c/FXRuby.cpp +57 -37
  303. data/ext/fox16_c/core_wrap.cpp +2593 -2155
  304. data/ext/fox16_c/dc_wrap.cpp +1033 -707
  305. data/ext/fox16_c/dialogs_wrap.cpp +1865 -1513
  306. data/ext/fox16_c/extconf.rb +11 -8
  307. data/ext/fox16_c/frames_wrap.cpp +3257 -2876
  308. data/ext/fox16_c/fx3d_wrap.cpp +2170 -1780
  309. data/ext/fox16_c/gvl_wrappers.cpp +1 -0
  310. data/ext/fox16_c/iconlist_wrap.cpp +1209 -882
  311. data/ext/fox16_c/icons_wrap.cpp +1132 -775
  312. data/ext/fox16_c/image_wrap.cpp +1116 -756
  313. data/ext/fox16_c/impl.cpp +1 -0
  314. data/ext/fox16_c/include/FXRbDCWindow.h +1 -1
  315. data/ext/fox16_c/include/FXRuby.h +6 -6
  316. data/ext/fox16_c/label_wrap.cpp +1702 -1354
  317. data/ext/fox16_c/layout_wrap.cpp +1752 -1392
  318. data/ext/fox16_c/list_wrap.cpp +899 -572
  319. data/ext/fox16_c/make_impl.rb +1 -0
  320. data/ext/fox16_c/markfuncs.cpp +1 -0
  321. data/ext/fox16_c/mdi_wrap.cpp +1220 -881
  322. data/ext/fox16_c/menu_wrap.cpp +1402 -1057
  323. data/ext/fox16_c/scintilla_wrap.cpp +658 -337
  324. data/ext/fox16_c/swigruby.h +262 -119
  325. data/ext/fox16_c/table_wrap.cpp +1064 -741
  326. data/ext/fox16_c/text_wrap.cpp +1062 -741
  327. data/ext/fox16_c/treelist_wrap.cpp +1522 -1189
  328. data/ext/fox16_c/ui_wrap.cpp +3610 -3216
  329. data/ext/fox16_c/unregisterOwnedObjects.cpp +1 -0
  330. data/fxruby.gemspec +6 -1
  331. data/lib/fox16/canvas.rb +1 -1
  332. data/lib/fox16/core.rb +97 -26
  333. data/lib/fox16/undolist.rb +32 -32
  334. data/lib/fox16/version.rb +1 -1
  335. data/rdoc-sources/FXApp.rb +12 -0
  336. data/rdoc-sources/FXFont.rb +2 -0
  337. data/rdoc-sources/FXMDIClient.rb +15 -0
  338. data/scripts/iface.rb +1 -0
  339. data/swig-interfaces/FXScintilla.i +1 -1
  340. data/swig-interfaces/FXText.i +1 -1
  341. data/swig-interfaces/freefuncs.i +1 -0
  342. data/swig-interfaces/ruby-typemaps.i +19 -19
  343. data/test/TC_FXBMPImage.rb +1 -1
  344. data/test/TC_FXDC.rb +24 -0
  345. data/test/TC_FXMat4f.rb +23 -14
  346. data/test/TC_FXSize.rb +8 -4
  347. data/test/TS_All.rb +4 -0
  348. data.tar.gz.sig +0 -0
  349. metadata +18 -15
  350. metadata.gz.sig +0 -0
@@ -1,11 +1,41 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (https://www.swig.org).
3
- * Version 4.2.0
3
+ * Version 4.5.0
4
4
  *
5
5
  * Do not make changes to this file unless you know what you are doing - modify
6
6
  * the SWIG interface file instead.
7
7
  * ----------------------------------------------------------------------------- */
8
8
 
9
+ #ifndef SWIG_RUNTIME_HEADER_
10
+ #define SWIG_RUNTIME_HEADER_
11
+
12
+ /* -----------------------------------------------------------------------------
13
+ * swigcompat.swg
14
+ *
15
+ * Macros to provide support compatibility with older C and C++ standards.
16
+ *
17
+ * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
18
+ * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
19
+ * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
20
+ * ----------------------------------------------------------------------------- */
21
+
22
+ /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
23
+ * if you're missing it.
24
+ */
25
+ #if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
26
+ (defined __cplusplus && __cplusplus >= 201103L) || \
27
+ defined SWIG_HAVE_SNPRINTF) && \
28
+ !defined SWIG_NO_SNPRINTF
29
+ # define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
30
+ # define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
31
+ #else
32
+ /* Fallback versions ignore the buffer size, but most of our uses either have a
33
+ * fixed maximum possible size or dynamically allocate a buffer that's large
34
+ * enough.
35
+ */
36
+ # define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
37
+ # define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
38
+ #endif
9
39
  /* -----------------------------------------------------------------------------
10
40
  * This section contains generic SWIG labels for method/variable
11
41
  * declarations/attributes, and other compiler dependent labels.
@@ -130,11 +160,14 @@
130
160
  # pragma warning disable 592
131
161
  #endif
132
162
 
133
- #if __cplusplus >=201103L
134
- # define SWIG_NULLPTR nullptr
163
+ #if defined(__cplusplus) && __cplusplus >= 201103L
164
+ # define SWIG_NOEXCEPT noexcept
135
165
  #else
136
- # define SWIG_NULLPTR NULL
166
+ # define SWIG_NOEXCEPT throw()
137
167
  #endif
168
+
169
+ #define SWIG_QUOTE_STRING(x) #x
170
+ #define SWIG_STRINGIFY(x) SWIG_QUOTE_STRING(x)
138
171
  /* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
139
172
  #define SWIG_UnknownError -1
140
173
  #define SWIG_IOError -2
@@ -159,13 +192,11 @@
159
192
 
160
193
  /* This should only be incremented when either the layout of swig_type_info changes,
161
194
  or for whatever reason, the runtime changes incompatibly */
162
- #define SWIG_RUNTIME_VERSION "4"
195
+ #define SWIG_RUNTIME_VERSION "5"
163
196
 
164
197
  /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
165
198
  #ifdef SWIG_TYPE_TABLE
166
- # define SWIG_QUOTE_STRING(x) #x
167
- # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
168
- # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
199
+ # define SWIG_TYPE_TABLE_NAME SWIG_STRINGIFY(SWIG_TYPE_TABLE)
169
200
  #else
170
201
  # define SWIG_TYPE_TABLE_NAME
171
202
  #endif
@@ -333,23 +364,6 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
333
364
  # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
334
365
  #endif
335
366
 
336
- /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
337
- * if you're missing it.
338
- */
339
- #if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
340
- (defined __cplusplus && __cplusplus >= 201103L) || \
341
- defined SWIG_HAVE_SNPRINTF) && \
342
- !defined SWIG_NO_SNPRINTF
343
- # define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
344
- # define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
345
- #else
346
- /* Fallback versions ignore the buffer size, but most of our uses either have a
347
- * fixed maximum possible size or dynamically allocate a buffer that's large
348
- * enough.
349
- */
350
- # define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
351
- # define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
352
- #endif
353
367
 
354
368
  #include <string.h>
355
369
 
@@ -374,8 +388,8 @@ typedef struct swig_type_info {
374
388
  typedef struct swig_cast_info {
375
389
  swig_type_info *type; /* pointer to type that is equivalent to this type */
376
390
  swig_converter_func converter; /* function to cast the void pointers */
377
- struct swig_cast_info *next; /* pointer to next cast in linked list */
378
- struct swig_cast_info *prev; /* pointer to the previous cast */
391
+ struct swig_cast_info *next; /* pointer to next array of casts | pointer to cast hashed by value */
392
+ unsigned int value; /* index of the last valid element in the array | typename hash value */
379
393
  } swig_cast_info;
380
394
 
381
395
  /* Structure used to store module information
@@ -436,55 +450,147 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
436
450
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
437
451
  }
438
452
 
453
+ /*
454
+ * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
455
+ */
456
+ SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len) {
457
+ const unsigned char *data = (const unsigned char *)str;
458
+ unsigned int hash = len, i = 0, k;
459
+ int rem = (int)len;
460
+
461
+ while (rem >= (int)sizeof(unsigned int)) {
462
+ memcpy(&k, data, sizeof(unsigned int));
463
+ k += i++;
464
+ hash ^= k;
465
+ hash *= 171717;
466
+ data += sizeof(unsigned int);
467
+ rem -= (int)sizeof(unsigned int);
468
+ }
469
+
470
+ switch (rem) {
471
+ case 3: k = (unsigned int)(data[2]) << 16;
472
+ k |= (unsigned int)(data[1]) << 8;
473
+ k |= (unsigned int)(data[0]);
474
+ k += i++;
475
+ hash ^= k;
476
+ hash *= 171717;
477
+ break;
478
+ case 2: k = (unsigned int)(data[1]) << 8;
479
+ k |= (unsigned int)(data[0]);
480
+ k += i++;
481
+ hash ^= k;
482
+ hash *= 171717;
483
+ break;
484
+ case 1: k = (unsigned int)(data[0]);
485
+ k += i++;
486
+ hash ^= k;
487
+ hash *= 171717;
488
+ break;
489
+ }
490
+ return hash;
491
+ }
492
+
439
493
  /*
440
494
  Check the typename
441
495
  */
442
496
  SWIGRUNTIME swig_cast_info *
443
497
  SWIG_TypeCheck(const char *c, swig_type_info *ty) {
498
+ static const unsigned int scan_threshold = 4;
444
499
  if (ty) {
445
- swig_cast_info *iter = ty->cast;
446
- while (iter) {
447
- if (strcmp(iter->type->name, c) == 0) {
448
- if (iter == ty->cast)
449
- return iter;
450
- /* Move iter to the top of the linked list */
451
- iter->prev->next = iter->next;
452
- if (iter->next)
453
- iter->next->prev = iter->prev;
454
- iter->next = ty->cast;
455
- iter->prev = 0;
456
- if (ty->cast) ty->cast->prev = iter;
457
- ty->cast = iter;
458
- return iter;
500
+ swig_cast_info *head = ty->cast;
501
+ unsigned int hash_value = 0;
502
+ int hashed = 0;
503
+
504
+ while (head) {
505
+
506
+ if (strcmp(head->type->name, c) == 0) {
507
+ return head;
459
508
  }
460
- iter = iter->next;
509
+
510
+ if (head->value) {
511
+ swig_cast_info *iter;
512
+ swig_cast_info *last = head + head->value;
513
+ swig_cast_info *first = head + 1;
514
+ int search = 1;
515
+
516
+ if (!hashed) {
517
+ if (head->value < scan_threshold) {
518
+ for (iter = first; iter <= last; iter++) {
519
+ if (strcmp(iter->type->name, c) == 0) {
520
+ return iter;
521
+ }
522
+ }
523
+ search = 0;
524
+ } else {
525
+ hashed = 1;
526
+ hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
527
+ }
528
+ }
529
+
530
+ if (search) {
531
+ /* Binary search over sorted <'next'|'value'> pairs */
532
+ do {
533
+ iter = first + ((last - first) >> 1);
534
+ if (iter->value < hash_value) {
535
+ first = iter + 1;
536
+ } else if (iter->value == hash_value) {
537
+
538
+ if (strcmp(iter->next->type->name, c) == 0) {
539
+ return iter->next;
540
+ }
541
+
542
+ /* Hash collision check */
543
+ for (last = iter + 1; last->next && last->value == hash_value; last++) {
544
+ if (strcmp(last->next->type->name, c) == 0) {
545
+ return last->next;
546
+ }
547
+ }
548
+ for (first = iter - 1; first != head && first->value == hash_value; first--) {
549
+ if (strcmp(first->next->type->name, c) == 0) {
550
+ return first->next;
551
+ }
552
+ }
553
+ break;
554
+ } else
555
+ last = iter - 1;
556
+ } while (first <= last);
557
+ }
558
+ }
559
+ head = head->next;
461
560
  }
462
561
  }
463
562
  return 0;
464
563
  }
465
564
 
466
565
  /*
467
- Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
566
+ Check the type by type address
468
567
  */
469
568
  SWIGRUNTIME swig_cast_info *
470
569
  SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
471
570
  if (ty) {
472
- swig_cast_info *iter = ty->cast;
473
- while (iter) {
474
- if (iter->type == from) {
475
- if (iter == ty->cast)
476
- return iter;
477
- /* Move iter to the top of the linked list */
478
- iter->prev->next = iter->next;
479
- if (iter->next)
480
- iter->next->prev = iter->prev;
481
- iter->next = ty->cast;
482
- iter->prev = 0;
483
- if (ty->cast) ty->cast->prev = iter;
484
- ty->cast = iter;
485
- return iter;
571
+ swig_cast_info *head = ty->cast;
572
+ while (head) {
573
+ if (head->type == from) {
574
+ return head;
486
575
  }
487
- iter = iter->next;
576
+
577
+ if (head->value) {
578
+ swig_cast_info *iter;
579
+ swig_cast_info *last = head + head->value;
580
+ swig_cast_info *first = head + 1;
581
+
582
+ /* Binary search over sorted array of casts */
583
+ do {
584
+ iter = first + ((last - first) >> 1);
585
+ if (iter->type < from) {
586
+ first = iter + 1;
587
+ } else if (iter->type == from) {
588
+ return iter;
589
+ } else
590
+ last = iter - 1;
591
+ } while (first <= last);
592
+ }
593
+ head = head->next;
488
594
  }
489
595
  }
490
596
  return 0;
@@ -547,20 +653,24 @@ SWIG_TypePrettyName(const swig_type_info *type) {
547
653
  */
548
654
  SWIGRUNTIME void
549
655
  SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
550
- swig_cast_info *cast = ti->cast;
656
+ swig_cast_info *head = ti->cast;
551
657
  /* if (ti->clientdata == clientdata) return; */
552
658
  ti->clientdata = clientdata;
553
659
 
554
- while (cast) {
555
- if (!cast->converter) {
556
- swig_type_info *tc = cast->type;
557
- if (!tc->clientdata) {
558
- SWIG_TypeClientData(tc, clientdata);
660
+ while (head) {
661
+ swig_cast_info *cast;
662
+ for (cast = head; (unsigned int)(cast - head) <= head->value; cast++) {
663
+ if (!cast->converter) {
664
+ swig_type_info *tc = cast->type;
665
+ if (!tc->clientdata) {
666
+ SWIG_TypeClientData(tc, clientdata);
667
+ }
559
668
  }
560
669
  }
561
- cast = cast->next;
670
+ head = head->next;
562
671
  }
563
672
  }
673
+
564
674
  SWIGRUNTIME void
565
675
  SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
566
676
  SWIG_TypeClientData(ti, clientdata);
@@ -699,7 +809,7 @@ SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
699
809
  if ((2*sizeof(void *) + 2) > bsz) return 0;
700
810
  *(r++) = '_';
701
811
  r = SWIG_PackData(r,&ptr,sizeof(void *));
702
- if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
812
+ if (strlen(name) + 1 > (bsz - (size_t)(r - buff))) return 0;
703
813
  strcpy(r,name);
704
814
  return buff;
705
815
  }
@@ -761,20 +871,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
761
871
  #endif
762
872
  #endif
763
873
 
764
- #include <ruby.h>
765
-
766
- #if defined(RB_METHOD_DEFINITION_DECL)
767
- # define RUBY_VALUE_METHOD_FUNC(func) (func)
768
- # define RUBY_INT_METHOD_FUNC(func) (func)
769
- # define RUBY_VOID_METHOD_FUNC(func) (func)
770
- # define RUBY_VOIDP_METHOD_FUNC(func) (func)
771
- #else
772
- # define RUBY_VALUE_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))
773
- # define RUBY_INT_METHOD_FUNC(func) ((int (*)(ANYARGS))(func))
774
- # define RUBY_VOID_METHOD_FUNC(func) ((void (*)(ANYARGS))(func))
775
- # define RUBY_VOIDP_METHOD_FUNC(func) ((void *(*)(ANYARGS))(func))
776
- #endif
777
-
874
+ #include <ruby.h>
778
875
  #include <ruby/version.h> /* For RUBY_API_VERSION_CODE */
779
876
 
780
877
  #if __GNUC__ >= 7
@@ -875,7 +972,15 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
875
972
  #ifndef RTYPEDDATA_P
876
973
  # define RTYPEDDATA_P(x) (TYPE(x) != T_DATA)
877
974
  #endif
975
+ #ifndef TYPED_DATA_EMBEDDED
976
+ # define RTYPEDDATA_GET_DATA(x) RTYPEDDATA_DATA(x)
977
+ #endif
878
978
 
979
+ struct ruby_wrapped_object {
980
+ void *data;
981
+ void (*dmark)(void *);
982
+ void (*dfree)(void *);
983
+ };
879
984
 
880
985
 
881
986
  /*
@@ -957,15 +1062,12 @@ static VALUE _mSWIG = Qnil;
957
1062
 
958
1063
 
959
1064
  /* Define custom exceptions for errors that do not map to existing Ruby
960
- exceptions. Note this only works for C++ since a global cannot be
961
- initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
1065
+ exceptions. */
962
1066
 
963
1067
  SWIGINTERN VALUE
964
1068
  getNullReferenceError(void) {
965
- static int init = 0;
966
- static VALUE rb_eNullReferenceError ;
967
- if (!init) {
968
- init = 1;
1069
+ static VALUE rb_eNullReferenceError = Qnil;
1070
+ if (rb_eNullReferenceError == Qnil) {
969
1071
  rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError);
970
1072
  }
971
1073
  return rb_eNullReferenceError;
@@ -973,10 +1075,8 @@ getNullReferenceError(void) {
973
1075
 
974
1076
  SWIGINTERN VALUE
975
1077
  getObjectPreviouslyDeletedError(void) {
976
- static int init = 0;
977
- static VALUE rb_eObjectPreviouslyDeleted ;
978
- if (!init) {
979
- init = 1;
1078
+ static VALUE rb_eObjectPreviouslyDeleted = Qnil;
1079
+ if (rb_eObjectPreviouslyDeleted == Qnil) {
980
1080
  rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError);
981
1081
  }
982
1082
  return rb_eObjectPreviouslyDeleted;
@@ -1214,7 +1314,7 @@ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1214
1314
  // object might have the T_ZOMBIE type, but that's just
1215
1315
  // because the GC has flagged it as such for a deferred
1216
1316
  // destruction. Until then, it's still a T_DATA object.
1217
- DATA_PTR(object) = 0;
1317
+ ((struct ruby_wrapped_object *)RTYPEDDATA_GET_DATA(object))->data = 0;
1218
1318
  }
1219
1319
  }
1220
1320
 
@@ -1246,8 +1346,8 @@ extern "C" {
1246
1346
  #endif
1247
1347
 
1248
1348
  SWIGINTERN VALUE
1249
- SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1250
- if (NIL_P(target)) {
1349
+ SWIG_Ruby_AppendOutput(VALUE target, VALUE o, int is_void) {
1350
+ if (NIL_P(target) && is_void) {
1251
1351
  target = o;
1252
1352
  } else {
1253
1353
  if (TYPE(target) != T_ARRAY) {
@@ -1344,6 +1444,7 @@ typedef struct {
1344
1444
  VALUE mImpl;
1345
1445
  void (*mark)(void *);
1346
1446
  void (*destroy)(void *);
1447
+ rb_data_type_t cext_type;
1347
1448
  int trackObjects;
1348
1449
  } swig_class;
1349
1450
 
@@ -1389,10 +1490,8 @@ static ID swig_lowerthan_id = 0;
1389
1490
 
1390
1491
  SWIGRUNTIME VALUE
1391
1492
  getExceptionClass(void) {
1392
- static int init = 0;
1393
- static VALUE rubyExceptionClass ;
1394
- if (!init) {
1395
- init = 1;
1493
+ static VALUE rubyExceptionClass = Qnil;
1494
+ if (rubyExceptionClass == Qnil) {
1396
1495
  rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception"));
1397
1496
  }
1398
1497
  return rubyExceptionClass;
@@ -1439,6 +1538,27 @@ SWIG_Ruby_define_class(swig_type_info *type)
1439
1538
  free((void *) klass_name);
1440
1539
  }
1441
1540
 
1541
+ static void SWIG_Ruby_mark_swig_type(void *_wrobj)
1542
+ {
1543
+ struct ruby_wrapped_object *wrobj = (struct ruby_wrapped_object *)_wrobj;
1544
+ if (wrobj->dmark) {
1545
+ wrobj->dmark(wrobj->data);
1546
+ }
1547
+ }
1548
+
1549
+ static void SWIG_Ruby_free_swig_type(void *_wrobj)
1550
+ {
1551
+ struct ruby_wrapped_object *wrobj = (struct ruby_wrapped_object *)_wrobj;
1552
+ if (wrobj->dfree) {
1553
+ wrobj->dfree(wrobj->data);
1554
+ }
1555
+ free(wrobj);
1556
+ }
1557
+
1558
+ static const rb_data_type_t swig_type_type = {
1559
+ .wrap_struct_name = "swig_type"
1560
+ };
1561
+
1442
1562
  /* Create a new pointer object */
1443
1563
  SWIGRUNTIME VALUE
1444
1564
  SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
@@ -1449,6 +1569,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1449
1569
  swig_class *sklass;
1450
1570
  VALUE klass;
1451
1571
  VALUE obj;
1572
+ struct ruby_wrapped_object *wrobj;
1452
1573
 
1453
1574
  if (!ptr)
1454
1575
  return Qnil;
@@ -1476,10 +1597,11 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1476
1597
  }
1477
1598
 
1478
1599
  /* Create a new Ruby object */
1479
- obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1480
- ( own ? VOIDFUNC(sklass->destroy) :
1481
- (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1482
- ), ptr);
1600
+ obj = TypedData_Make_Struct(sklass->klass, struct ruby_wrapped_object, &sklass->cext_type, wrobj);
1601
+ wrobj->data = ptr;
1602
+ wrobj->dmark = sklass->mark;
1603
+ wrobj->dfree = own ? sklass->destroy:
1604
+ (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 );
1483
1605
 
1484
1606
  /* If tracking is on for this class then track this object. */
1485
1607
  if (track) {
@@ -1491,7 +1613,11 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1491
1613
  SWIG_snprintf(klass_name, klass_len, "TYPE%s", type->name);
1492
1614
  klass = rb_const_get(_mSWIG, rb_intern(klass_name));
1493
1615
  free((void *) klass_name);
1494
- obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1616
+
1617
+ obj = TypedData_Make_Struct(klass, struct ruby_wrapped_object, &swig_type_type, wrobj);
1618
+ wrobj->data = ptr;
1619
+ wrobj->dmark = 0;
1620
+ wrobj->dfree = 0;
1495
1621
  }
1496
1622
  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1497
1623
 
@@ -1504,7 +1630,13 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1504
1630
  {
1505
1631
  VALUE obj;
1506
1632
  swig_class *sklass = (swig_class *) type->clientdata;
1507
- obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1633
+ struct ruby_wrapped_object *wrobj;
1634
+
1635
+ obj = TypedData_Make_Struct(klass, struct ruby_wrapped_object, &sklass->cext_type, wrobj);
1636
+ wrobj->data = 0;
1637
+ wrobj->dmark = sklass->mark;
1638
+ wrobj->dfree = sklass->destroy;
1639
+
1508
1640
  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1509
1641
  return obj;
1510
1642
  }
@@ -1528,9 +1660,10 @@ typedef struct {
1528
1660
  SWIGRUNTIME swig_ruby_owntype
1529
1661
  SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
1530
1662
  swig_ruby_owntype oldown = {0, 0};
1531
- if (TYPE(obj) == T_DATA && !RTYPEDDATA_P(obj)) {
1532
- oldown.datafree = RDATA(obj)->dfree;
1533
- RDATA(obj)->dfree = own.datafree;
1663
+ if (RB_TYPE_P(obj, RUBY_T_DATA) && RTYPEDDATA_P(obj)) {
1664
+ struct ruby_wrapped_object *wrobj = (struct ruby_wrapped_object *)RTYPEDDATA_GET_DATA(obj);
1665
+ oldown.datafree = wrobj->dfree;
1666
+ wrobj->dfree = own.datafree;
1534
1667
  }
1535
1668
  return oldown;
1536
1669
  }
@@ -1542,26 +1675,27 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1542
1675
  char *c;
1543
1676
  swig_cast_info *tc;
1544
1677
  void *vptr = 0;
1678
+ struct ruby_wrapped_object *wrobj;
1545
1679
 
1546
1680
  /* Grab the pointer */
1547
1681
  if (NIL_P(obj)) {
1548
1682
  if (ptr)
1549
1683
  *ptr = 0;
1550
1684
  return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
1685
+ } else if (RB_TYPE_P(obj, RUBY_T_DATA) && RTYPEDDATA_P(obj)) {
1686
+ wrobj = (struct ruby_wrapped_object *)RTYPEDDATA_GET_DATA(obj);
1687
+ vptr = wrobj->data;
1551
1688
  } else {
1552
- if (TYPE(obj) != T_DATA || (TYPE(obj) == T_DATA && RTYPEDDATA_P(obj))) {
1553
- return SWIG_ERROR;
1554
- }
1555
- Data_Get_Struct(obj, void, vptr);
1689
+ return SWIG_ERROR;
1556
1690
  }
1557
1691
 
1558
1692
  if (own) {
1559
- own->datafree = RDATA(obj)->dfree;
1693
+ own->datafree = wrobj->dfree;
1560
1694
  own->own = 0;
1561
1695
  }
1562
1696
 
1563
1697
  if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE)) {
1564
- if (!RDATA(obj)->dfree)
1698
+ if (!wrobj->dfree)
1565
1699
  return SWIG_ERROR_RELEASE_NOT_OWNED;
1566
1700
  }
1567
1701
 
@@ -1584,14 +1718,14 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1584
1718
  * when the Ruby object is garbage collected. If we don't
1585
1719
  * do this, then it is possible we will return a reference
1586
1720
  * to a Ruby object that no longer exists thereby crashing Ruby. */
1587
- RDATA(obj)->dfree = SWIG_RubyRemoveTracking;
1721
+ wrobj->dfree = SWIG_RubyRemoveTracking;
1588
1722
  } else {
1589
- RDATA(obj)->dfree = 0;
1723
+ wrobj->dfree = 0;
1590
1724
  }
1591
1725
  }
1592
1726
 
1593
1727
  if (flags & SWIG_POINTER_CLEAR) {
1594
- DATA_PTR(obj) = 0;
1728
+ wrobj->data = 0;
1595
1729
  }
1596
1730
 
1597
1731
  /* Do type-checking if type info was provided */
@@ -1675,6 +1809,11 @@ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1675
1809
  return SWIG_ERROR;
1676
1810
  }
1677
1811
 
1812
+
1813
+ static const rb_data_type_t swig_runtime_data_type = {
1814
+ .wrap_struct_name = "swig_runtime_data" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
1815
+ };
1816
+
1678
1817
  SWIGRUNTIME swig_module_info *
1679
1818
  SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
1680
1819
  {
@@ -1684,11 +1823,13 @@ SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
1684
1823
 
1685
1824
  /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */
1686
1825
  rb_gv_set("VERBOSE", Qfalse);
1687
-
1826
+
1688
1827
  /* first check if pointer already created */
1689
1828
  pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1690
1829
  if (pointer != Qnil) {
1691
- Data_Get_Struct(pointer, swig_module_info, ret);
1830
+ /* Can not use TypedData_Get_Struct because swig_runtime_data_type is not global, but once per file. */
1831
+ if (!RB_TYPE_P(pointer, RUBY_T_DATA)) rb_check_typeddata(pointer, &swig_runtime_data_type);
1832
+ ret = (swig_module_info *)RTYPEDDATA_GET_DATA(pointer);
1692
1833
  }
1693
1834
 
1694
1835
  /* reinstate warnings */
@@ -1700,10 +1841,10 @@ SWIGRUNTIME void
1700
1841
  SWIG_Ruby_SetModule(swig_module_info *pointer)
1701
1842
  {
1702
1843
  /* register a new class */
1703
- VALUE cl = rb_define_class("SWIG_RUNTIME_DATA", rb_cObject);rb_undef_alloc_func(cl);
1844
+ VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1704
1845
  rb_undef_alloc_func(cl);
1705
1846
  /* create and store the structure pointer to a global variable */
1706
- swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1847
+ swig_runtime_data_type_pointer = TypedData_Wrap_Struct(cl, &swig_runtime_data_type, pointer);
1707
1848
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1708
1849
  }
1709
1850
 
@@ -1783,3 +1924,5 @@ SWIG_MangledTypeQuery(const char *name) {
1783
1924
  }
1784
1925
 
1785
1926
  #endif
1927
+
1928
+ #endif /* SWIG_RUNTIME_HEADER_ */