Permalink
Browse files

Moved addons to use IoState_registerProtoWithId_() and IoState_protoW…

…ithId_()
  • Loading branch information...
1 parent bd0df87 commit fe9b43c0e6ad3b9a9ac52ea3b748bc71b819ab9d @stevedekorte committed Jan 16, 2012
Showing with 2,124 additions and 2,711 deletions.
  1. +4 −3 addons/AVCodec/source/IoAVCodec.c
  2. +4 −2 addons/AppleExtras/source/IoAppleSensors.c
  3. +5 −3 addons/AsyncRequest/source/IoAsyncRequest.c
  4. +5 −3 addons/BigNum/source/IoBigNum.c
  5. +3 −3 addons/Blowfish/source/IoBlowfish.c
  6. +3 −3 addons/Box/source/IoBox.c
  7. +0 −745 addons/Curses/source/IoCurses.c
  8. +0 −79 addons/Curses/source/IoCurses.h
  9. +4 −2 addons/DBI/source/IoDBI.c
  10. +5 −3 addons/DBI/source/IoDBIConn.c
  11. +5 −6 addons/DBI/source/IoDBIResult.c
  12. +5 −3 addons/Fnmatch/source/IoFnmatch.c
  13. +5 −3 addons/Font/source/IoFont.c
  14. +9 −5 addons/GLFW/source/IoGLFW.c
  15. +5 −3 addons/Image/source/IoImage.c
  16. +5 −3 addons/LZO/source/IoLZODecoder.c
  17. +2 −0 addons/LZO/source/IoLZODecoder.h
  18. +5 −3 addons/LZO/source/IoLZOEncoder.c
  19. +2 −0 addons/LZO/source/IoLZOEncoder.h
  20. +5 −3 addons/LibSndFile/source/IoLibSndFile.c
  21. +5 −3 addons/Libxml2/source/IoXmlWriter.c
  22. +3 −1 addons/Loki/source/IoLinker.c
  23. +3 −3 addons/MD5/source/IoMD5.c
  24. +4 −2 addons/ODE/source/IoODEBall.c
  25. +6 −4 addons/ODE/source/IoODEBody.c
  26. +5 −3 addons/ODE/source/IoODEBox.c
  27. +6 −4 addons/ODE/source/IoODEContact.c
  28. +4 −2 addons/ODE/source/IoODEContactJoint.c
  29. +4 −2 addons/ODE/source/IoODEFixed.c
  30. +4 −2 addons/ODE/source/IoODEHinge.c
  31. +3 −1 addons/ODE/source/IoODEHinge2.c
  32. +5 −3 addons/ODE/source/IoODEJoint.c
  33. +5 −3 addons/ODE/source/IoODEJointGroup.c
  34. +4 −2 addons/ODE/source/IoODEMass.c
  35. +3 −1 addons/ODE/source/IoODEPlane.c
  36. +5 −2 addons/ODE/source/IoODESimpleSpace.c
  37. +3 −1 addons/ODE/source/IoODESlider.c
  38. +3 −1 addons/ODE/source/IoODEUniversal.c
  39. +5 −3 addons/ODE/source/IoODEWorld.c
  40. +3 −3 addons/ObjcBridge/source/Io2Objc.m
  41. +3 −3 addons/ObjcBridge/source/IoObjcBridge.m
  42. +6 −4 addons/Ogg/source/IoOggPacket.c
  43. +5 −4 addons/Ogg/source/IoOggPage.c
  44. +5 −4 addons/Ogg/source/IoOggStreamState.c
  45. +5 −4 addons/Ogg/source/IoOggSyncState.c
  46. +1 −1 addons/OpenGL/source/IoBox_gl.c
  47. +5 −3 addons/OpenGL/source/IoGLScissor.c
  48. +12 −6 addons/OpenGL/source/IoGLU.c
  49. +5 −6 addons/OpenGL/source/IoGLUQuadric.c
  50. +5 −4 addons/OpenGL/source/IoGLUT.c
  51. +13 −9 addons/OpenGL/source/new/IoGLE.c
  52. +4 −3 addons/OpenGL/source/new/IoSceneNode.c
  53. +6 −4 addons/PortAudio/source/IoAudioDevice.c
  54. +5 −3 addons/PortAudio/source/new/IoAudioMixer.c
  55. +4 −3 addons/PortAudio/source/new/IoAudioTrack.c
  56. +5 −3 addons/PortAudio/source/new/IoMP3Decoder.c
  57. +5 −3 addons/PortAudio/source/new/IoMP3Encoder.c
  58. +5 −2 addons/Python/source/IoPython.c
  59. +4 −2 addons/QDBM/source/IoQDBM.c
  60. +2 −0 addons/Random/source/IoRandom.c
  61. +6 −3 addons/Range/source/IoRange.c
  62. +18 −5 addons/Regex/source/IoRegex.c
  63. +4 −3 addons/SGML/source/IoSGMLParser.c
  64. +4 −3 addons/SHA1/source/IoSHA1.c
  65. +4 −3 addons/SQLite/source/IoSQLite.c
  66. +4 −3 addons/SQLite3/source/IoSQLite3.c
  67. +5 −3 addons/SampleRateConverter/source/IoSampleRateConverter.c
  68. +4 −3 addons/SkipDB/source/IoSkipDB.c
  69. +4 −3 addons/SkipDB/source/IoSkipDBCursor.c
  70. +4 −3 addons/SkipDB/source/IoSkipDBM.c
  71. +3 −3 addons/Socket/source/IoEvConnection.c
  72. +3 −3 addons/Socket/source/IoEvHttpServer.c
  73. +3 −3 addons/Socket/source/IoEvOutRequest.c
  74. +3 −3 addons/Socket/source/IoEvOutResponse.c
  75. +4 −4 addons/Socket/source/IoEvent.c
  76. +3 −3 addons/Socket/source/IoEventManager.c
  77. +3 −3 addons/Socket/source/IoIPAddress.c
  78. +3 −3 addons/Socket/source/IoSocket.c
  79. +3 −3 addons/Socket/source/IoUnixPath.c
  80. +4 −3 addons/SoundTouch/source/IoSoundTouch.c
  81. +5 −3 addons/Syslog/source/IoSyslog.c
  82. +3 −3 addons/SystemCall/source/IoSystemCall.c
  83. +7 −3 addons/TagDB/source/IoTagDB.c
  84. +3 −2 addons/TagLib/source/IoTagLib.c
  85. +5 −3 addons/Thread/source/IoThread.c
  86. +5 −3 addons/UUID/source/IoUUID.c
  87. +5 −3 addons/User/source/IoUser.c
  88. +16 −18 addons/Yajl/source/IoYajl.c
  89. +4 −4 addons/Yajl/source/IoYajlGen.c
  90. +4 −3 addons/Zlib/source/IoZlibDecoder.c
  91. +4 −3 addons/Zlib/source/IoZlibEncoder.c
  92. +1 −1 docs/IoCodingStandards.html
  93. +162 −433 extras/osx/osx.xcodeproj/project.pbxproj
  94. +1,466 −1,101 ...m/osxvm.xcodeproj/project.xcworkspace/xcuserdata/steve.xcuserdatad/UserInterfaceState.xcuserstate
  95. +4 −4 libs/iovm/source/IoBlock.c
  96. +5 −5 libs/iovm/source/IoCFunction.c
  97. +4 −4 libs/iovm/source/IoCall.c
  98. +4 −4 libs/iovm/source/IoCoroutine.c
  99. +4 −4 libs/iovm/source/IoDate.c
  100. +4 −4 libs/iovm/source/IoDirectory.c
  101. +3 −3 libs/iovm/source/IoDuration.c
  102. +3 −3 libs/iovm/source/IoDynLib.c
  103. +2 −2 libs/iovm/source/IoError.c
  104. +2 −2 libs/iovm/source/IoFile.c
  105. +3 −3 libs/iovm/source/IoList.c
  106. +3 −3 libs/iovm/source/IoMap.c
  107. +3 −3 libs/iovm/source/IoMessage.c
  108. +3 −3 libs/iovm/source/IoNumber.c
  109. +5 −5 libs/iovm/source/IoObject.c
  110. +3 −3 libs/iovm/source/IoSandbox.c
  111. +4 −4 libs/iovm/source/IoSeq.c
  112. +10 −8 libs/iovm/source/IoState.c
  113. +3 −2 libs/iovm/source/IoState.h
  114. +1 −1 libs/iovm/source/IoSystem.c
  115. +3 −3 libs/iovm/source/IoWeakLink.c
@@ -34,6 +34,7 @@ videoFrameCount
#include <limits.h>
//#include <math.h>
+static const char *protoId = "AVCodec";
#define DATA(self) ((IoAVCodecData *)IoObject_dataPointer(self))
@@ -46,7 +47,7 @@ void IoAVCodec_registerIfNeeded(IoAVCodec *self)
IoTag *IoAVCodec_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("AVCodec");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoAVCodec_rawClone);
IoTag_markFunc_(tag, (IoTagMarkFunc *)IoAVCodec_mark);
@@ -64,7 +65,7 @@ IoAVCodec *IoAVCodec_proto(void *state)
DATA(self)->inputBuffer = IoSeq_new(state);
DATA(self)->outputBuffer = IoSeq_new(state);
- IoState_registerProtoWithFunc_(state, self, IoAVCodec_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
IoAVCodec_registerIfNeeded(self);
@@ -104,7 +105,7 @@ IoAVCodec *IoAVCodec_rawClone(IoAVCodec *proto)
IoAVCodec *IoAVCodec_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoAVCodec_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -23,6 +23,8 @@ value := sensors getRightLightSensor
#define DATA(self) ((IoAppleSensorsData *)(IoObject_dataPointer(self)))
+const char *protoId = "AppleSensors";
+
IoTag *IoAppleSensors_newTag(void *state)
{
IoTag *tag = IoTag_newWithName_("AppleSensors");
@@ -39,7 +41,7 @@ IoAppleSensors *IoAppleSensors_proto(void *state)
//IoObject_setDataPointer_(self, calloc(1, sizeof(IoAppleSensorsData)));
- IoState_registerProtoWithFunc_(state, self, IoAppleSensors_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
@@ -72,7 +74,7 @@ IoAppleSensors *IoAppleSensors_rawClone(IoAppleSensors *proto)
IoAppleSensors *IoAppleSensors_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoAppleSensors_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -18,9 +18,11 @@ asynchronous in Io.
#define IOCB(self) ((struct aiocb *)(IoObject_dataPointer(self)))
#define IOCB_BUFFER(self) ((void *)(IOCB(self)->aio_buf))
+static const char *protoId = "AsyncRequest";
+
IoTag *IoAsyncRequest_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("AsyncRequest");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoAsyncRequest_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoAsyncRequest_free);
@@ -34,7 +36,7 @@ IoAsyncRequest *IoAsyncRequest_proto(void *state)
IoObject_setDataPointer_(self, calloc(1, sizeof(struct aiocb)));
- IoState_registerProtoWithFunc_(state, self, IoAsyncRequest_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
@@ -65,7 +67,7 @@ IoAsyncRequest *IoAsyncRequest_rawClone(IoAsyncRequest *proto)
IoAsyncRequest *IoAsyncRequest_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoAsyncRequest_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -7,9 +7,11 @@ Warning: GMP uses the restrictive GNU license which can be a problem if you are
#define DATA(self) ((IoBigNumData *)(IoObject_dataPointer(self)))
+static const char *protoId = "BigNum";
+
IoTag *IoBigNum_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("BigNum");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoBigNum_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoBigNum_free);
@@ -23,7 +25,7 @@ IoBigNum *IoBigNum_proto(void *state)
IoObject_tag_(self, IoBigNum_newTag(state));
IoObject_setDataPointer_(self, calloc(1, sizeof(IoBigNumData)));
mpz_init(DATA(self)->integer);
- IoState_registerProtoWithFunc_(state, self, IoBigNum_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
IoMethodTable methodTable[] = {
{"+", IoBigNum_add}
//doc BigNum +(aNum) Add op. Returns result.
@@ -146,7 +148,7 @@ IoBigNum *IoBigNum_rawClone(IoBigNum * proto)
IoBigNum *IoBigNum_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoBigNum_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -56,7 +56,7 @@ static const char *protoId = "Blowfish";
IoTag *IoBlowfish_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Blowfish");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoBlowfish_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoBlowfish_rawClone);
@@ -70,7 +70,7 @@ IoBlowfish *IoBlowfish_proto(void *state)
IoObject_setDataPointer_(self, calloc(1, sizeof(IoBlowfishData)));
- IoState_registerProtoWithFunc_(state, self, protoId);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
@@ -95,7 +95,7 @@ IoBlowfish *IoBlowfish_rawClone(IoBlowfish *proto)
IoBlowfish *IoBlowfish_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, protoId);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -34,7 +34,7 @@ void *IoMessage_locals_boxArgAt_(IoMessage *self, void *locals, int n)
IoTag *IoBox_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Box");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoBox_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoBox_rawClone);
@@ -55,7 +55,7 @@ IoBox *IoBox_rawClone(IoBox *proto)
IoBox *IoBox_new(void *state)
{
- IoBox *proto = IoState_protoWithInitFunction_(state, protoId);
+ IoBox *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -481,7 +481,7 @@ IoBox *IoBox_proto(void *state)
DATA(self)->origin = IoSeq_newVec3f(state, o);
DATA(self)->size = IoSeq_newVec3f(state, o);
- IoState_registerProtoWithFunc_(state, self, protoId);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
Oops, something went wrong.

0 comments on commit fe9b43c

Please sign in to comment.