Skip to content
Browse files

Merge pull request #203 from igstan/master

Fixed a few compilation issues in addons (from igstan)
  • Loading branch information...
2 parents d2105a2 + 3fdf5e9 commit 7e824d22871c46214ba6279da183acd7c88e7704 @stevedekorte committed May 9, 2012
Showing with 156 additions and 89 deletions.
  1. +4 −2 addons/AVCodec/source/old/IoAVCodec copy.c
  2. +4 −4 addons/AVCodec/source/old/IoAVCodec.c
  3. +4 −2 addons/CFFI/source/IoCFFIArray.c
  4. +4 −2 addons/CFFI/source/IoCFFIDataType.c
  5. +4 −2 addons/CFFI/source/IoCFFIFunction.c
  6. +5 −3 addons/CFFI/source/IoCFFIPointer.c
  7. +4 −2 addons/CFFI/source/IoCFFIStructure.c
  8. +4 −2 addons/Cairo/source/IoCairoContext.c
  9. +3 −2 addons/Cairo/source/IoCairoExtents.c
  10. +3 −2 addons/Cairo/source/IoCairoFontExtents.c
  11. +3 −2 addons/Cairo/source/IoCairoFontFace.c
  12. +3 −2 addons/Cairo/source/IoCairoFontOptions.c
  13. +3 −2 addons/Cairo/source/IoCairoGlyph.c
  14. +4 −3 addons/Cairo/source/IoCairoMatrix.c
  15. +3 −2 addons/Cairo/source/IoCairoPath.c
  16. +4 −2 addons/Cairo/source/IoCairoPathElement.c
  17. +3 −2 addons/Cairo/source/IoCairoPattern.c
  18. +3 −2 addons/Cairo/source/IoCairoRectangle.c
  19. +3 −2 addons/Cairo/source/IoCairoScaledFont.c
  20. +3 −2 addons/Cairo/source/IoCairoSurface.c
  21. +3 −2 addons/Cairo/source/IoCairoTextExtents.c
  22. +4 −2 addons/Clutter/source/IoClutter.c
  23. +4 −2 addons/Clutter/source/IoClutterActor.c
  24. +4 −2 addons/Clutter/source/IoClutterActorBox.c
  25. +4 −2 addons/Clutter/source/IoClutterColor.c
  26. +4 −2 addons/Clutter/source/IoClutterEvent.c
  27. +4 −2 addons/Clutter/source/IoClutterInputDevice.c
  28. +4 −2 addons/Clutter/source/IoClutterShader.c
  29. +4 −2 addons/Clutter/source/IoClutterStage.c
  30. +4 −2 addons/Clutter/source/IoClutterUnits.c
  31. +4 −2 addons/Clutter/source/IoClutterVertex.c
  32. +4 −2 addons/Loudmouth/source/IoLoudmouth.c
  33. +4 −2 addons/Memcached/source/IoMemcached.c
  34. +4 −2 addons/MySQL/source/IoMySQL.c
  35. +4 −2 addons/NetworkAdapter/source/IoNetworkAdapter.c
  36. +4 −2 addons/NullAddon/source/IoNullAddon.c
  37. +4 −2 addons/Oauth/source/IoOauth.c
  38. +0 −1 addons/SQLite3/source/IoSQLite3.c
  39. +4 −2 addons/SecureSocket/source/IoCertificate.c
  40. +5 −3 addons/SecureSocket/source/IoSecureSocket.c
  41. +4 −2 addons/Socket/source/new/IoEvDNS.c
  42. +5 −3 addons/Socket/source/new/IoEvDNSRequest.c
View
6 addons/AVCodec/source/old/IoAVCodec copy.c
@@ -19,6 +19,8 @@ AVCodec ioDoc(
#define DATA(self) ((IoAVCodecData *)IoObject_dataPointer(self))
#define IVAR(name) (((IoAVCodecData *)IoObject_dataPointer(self))->name)
+static const char *protoId = "AVCodec";
+
void IoAVCodec_registerIfNeeded(IoAVCodec *self)
{
avcodec_init();
@@ -28,7 +30,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);
@@ -91,7 +93,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);
}
View
8 addons/AVCodec/source/old/IoAVCodec.c
@@ -13,11 +13,11 @@ AVCodec ioDoc(
#include "IoSeq.h"
#include "IoList.h"
#include <limits.h>
-//#include <math.h>
-
#define DATA(self) ((IoAVCodecData *)IoObject_dataPointer(self))
+static const char *protoId = "AVCodec";
+
void IoAVCodec_registerIfNeeded(IoAVCodec *self)
{
avcodec_init();
@@ -26,7 +26,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);
@@ -87,7 +87,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);
}
View
6 addons/CFFI/source/IoCFFIArray.c
@@ -12,9 +12,11 @@
#define DATA(self) ((IoCFFIArrayData *)(IoObject_dataPointer(self)))
+static const char *protoId = "Array";
+
IoTag *IoCFFIArray_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Array");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCFFIArray_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCFFIArray_rawClone);
@@ -85,7 +87,7 @@ IoCFFIArray *IoCFFIArray_rawClone(IoCFFIArray *proto)
IoCFFIArray *IoCFFIArray_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoCFFIArray_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
6 addons/CFFI/source/IoCFFIDataType.c
@@ -19,11 +19,13 @@
#define DATA(self) ((IoCFFIDataTypeData *)(IoObject_dataPointer(self)))
#define POINTER(data) ((data)->valuePointer)
+static const char *protoId = "DataType";
+
void *IoCFFIDataType_null = NULL;
IoTag *IoCFFIDataType_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("DataType");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCFFIDataType_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCFFIDataType_rawClone);
@@ -68,7 +70,7 @@ IoCFFIDataType *IoCFFIDataType_rawClone(IoCFFIDataType *proto)
IoCFFIDataType *IoCFFIDataType_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoCFFIDataType_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
6 addons/CFFI/source/IoCFFIFunction.c
@@ -18,9 +18,11 @@
#define DATA(self) ((IoCFFIFunctionData *)(IoObject_dataPointer(self)))
void IoCFFIFunction_closure(ffi_cif* cif, void* result, void** args, void* userdata);
+static const char *protoId = "Function";
+
IoTag *IoCFFIFunction_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Function");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCFFIFunction_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCFFIFunction_rawClone);
@@ -66,7 +68,7 @@ IoCFFIFunction *IoCFFIFunction_rawClone(IoCFFIFunction *proto)
IoCFFIFunction *IoCFFIFunction_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoCFFIFunction_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
8 addons/CFFI/source/IoCFFIPointer.c
@@ -21,9 +21,11 @@
#define DATA(self) ((IoCFFIPointerData *)(IoObject_dataPointer(self)))
#define POINTER(data) ((data)->valuePointer + (data)->valueOffset)
+static const char *protoId = "Pointer";
+
IoTag *IoCFFIPointer_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Pointer");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCFFIPointer_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCFFIPointer_rawClone);
@@ -74,7 +76,7 @@ IoCFFIPointer *IoCFFIPointer_rawClone(IoCFFIPointer *proto)
IoCFFIPointer *IoCFFIPointer_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoCFFIPointer_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -100,7 +102,7 @@ IoCFFIPointer *IoCFFIPointer_ToType_(IoObject *type)
// this is a hack so macros relying on self will work
self = type;
- pointers = IoObject_getSlot_(IoState_protoWithInitFunction_(IOSTATE, IoCFFIPointer_proto), IOSYMBOL("pointers"));
+ pointers = IoObject_getSlot_(IoState_protoWithId_(IOSTATE, protoId), IOSYMBOL("pointers"));
key = IoState_on_doCString_withLabel_(IOSTATE, type, "uniqueHexId", "IoCFFIPointer_ToType_");
pointer = IoMap_rawAt(pointers, key);
View
6 addons/CFFI/source/IoCFFIStructure.c
@@ -25,11 +25,13 @@
#define DATA(self) ((IoCFFIStructureData *)(IoObject_dataPointer(self)))
+static const char *protoId = "Structure";
+
void *IoCFFIStructure_null = NULL;
IoTag *IoCFFIStructure_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Structure");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCFFIStructure_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCFFIStructure_rawClone);
@@ -127,7 +129,7 @@ IoCFFIStructure *IoCFFIStructure_rawClone(IoCFFIStructure *proto)
IoCFFIStructure *IoCFFIStructure_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoCFFIStructure_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
6 addons/Cairo/source/IoCairoContext.c
@@ -29,9 +29,11 @@
#define __func__ __FUNCTION__
#endif
+static const char *protoId = "CairoContext";
+
static IoTag *IoCairoContext_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoContext");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoContext_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoContext_free);
@@ -210,7 +212,7 @@ IoCairoContext *IoCairoContext_rawClone(IoCairoContext *proto)
IoCairoContext *IoCairoContext_newWithSurface_(void *state, IoCairoImageSurface *surface)
{
- IoCairoContext *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoContext_proto));
+ IoCairoContext *self = IOCLONE(IoState_protoWithInitId_(state, protoId));
cairo_t *rawContext = cairo_create(IoCairoSurface_rawSurface(surface));
checkStatus_(state, 0, cairo_status(rawContext));
IoObject_setDataPointer_(self, rawContext);
View
5 addons/Cairo/source/IoCairoExtents.c
@@ -7,10 +7,11 @@
#define DATA(self) ((IoCairoExtentsData *)IoObject_dataPointer(self))
+static const char *protoId = "CairoExtents";
static IoTag *IoCairoExtents_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoExtents");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoExtents_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoExtents_free);
@@ -48,7 +49,7 @@ IoCairoExtents *IoCairoExtents_rawClone(IoCairoExtents *proto)
IoCairoExtents *IoCairoExtents_newSet(void *state, double x1, double y1, double x2, double y2)
{
- IoCairoExtents *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoExtents_proto));
+ IoCairoExtents *self = IOCLONE(IoState_protoWithInitId_(state, protoId));
DATA(self)->x1 = x1;
DATA(self)->y1 = y1;
DATA(self)->x2 = x2;
View
5 addons/Cairo/source/IoCairoFontExtents.c
@@ -7,10 +7,11 @@
#define EXTENTS(self) ((cairo_font_extents_t *)IoObject_dataPointer(self))
+static const char *protoId = "CairoFontExtents";
static IoTag *IoCairoFontExtents_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoFontExtents");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoFontExtents_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoFontExtents_free);
@@ -49,7 +50,7 @@ IoCairoFontExtents *IoCairoFontExtents_rawClone(IoCairoFontExtents *proto)
IoCairoFontExtents *IoCairoFontExtents_newWithRawFontExtents(void *state, cairo_font_extents_t *extents)
{
- IoCairoFontExtents *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoFontExtents_proto));
+ IoCairoFontExtents *self = IOCLONE(IoState_protoWithInitId_(state, protoId));
memcpy(EXTENTS(self), extents, sizeof(cairo_font_extents_t));
return self;
}
View
5 addons/Cairo/source/IoCairoFontFace.c
@@ -7,6 +7,7 @@
#define FACE(self) ((cairo_font_face_t *)IoObject_dataPointer(self))
+static const char *protoId = "CairoFontFace";
void *IoMessage_locals_cairoFontFaceArgAt_(IoMessage *self, void *locals, int n)
{
@@ -19,7 +20,7 @@ void *IoMessage_locals_cairoFontFaceArgAt_(IoMessage *self, void *locals, int n)
static IoTag *IoCairoFontFace_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoFontFace");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoFontFace_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoFontFace_free);
@@ -46,7 +47,7 @@ IoCairoFontFace *IoCairoFontFace_rawClone(IoCairoFontFace *proto)
IoCairoFontFace *IoCairoFontFace_newWithRawFontFace_(void *state, cairo_font_face_t *face)
{
- IoCairoFontFace *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoFontFace_proto));
+ IoCairoFontFace *self = IOCLONE(IoState_protoWithInitId_(state, protoId));
IoObject_setDataPointer_(self, face);
return self;
}
View
5 addons/Cairo/source/IoCairoFontOptions.c
@@ -10,6 +10,7 @@
#define OPTIONS(self) ((cairo_font_options_t *)IoObject_dataPointer(self))
#define CHECK_STATUS(self) checkStatus_(IOSTATE, m, cairo_font_options_status(OPTIONS(self)))
+static const char *protoId = "CairoFontOptions";
void *IoMessage_locals_cairoFontOptionsArgAt_(IoMessage *self, void *locals, int n)
{
@@ -22,7 +23,7 @@ void *IoMessage_locals_cairoFontOptionsArgAt_(IoMessage *self, void *locals, int
static IoTag *IoCairoFontOptions_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoFontOptions");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoFontOptions_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoFontOptions_rawClone);
@@ -78,7 +79,7 @@ IoCairoFontOptions *IoCairoFontOptions_new(void *state, IoMessage *m)
IoCairoFontOptions *IoCairoFontOptions_newWithRawFontOptions_(void *state, IoMessage *m, cairo_font_options_t *options)
{
- IoCairoFontOptions *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoFontOptions_proto));
+ IoCairoFontOptions *self = IOCLONE(IoState_protoWithId_(state, proto));
IoObject_setDataPointer_(self, options);
CHECK_STATUS(self);
return self;
View
5 addons/Cairo/source/IoCairoGlyph.c
@@ -7,10 +7,11 @@
#define GLYPH(self) ((cairo_glyph_t *)IoObject_dataPointer(self))
+static const char *protoId = "CairoGlyph";
static IoTag *IoCairoGlyph_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoGlyph");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoGlyph_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoGlyph_free);
@@ -53,7 +54,7 @@ IoCairoGlyph *IoCairoGlyph_rawClone(IoCairoGlyph *proto)
IoCairoGlyph *IoCairoGlyph_newWithRawGlyph_(void *state, cairo_glyph_t *glyph)
{
- IoCairoGlyph *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoGlyph_proto));
+ IoCairoGlyph *self = IOCLONE(IoState_protoWithInitId_(state, protoId));
memcpy(GLYPH(self), glyph, sizeof(cairo_glyph_t));
return self;
}
View
7 addons/Cairo/source/IoCairoMatrix.c
@@ -8,6 +8,7 @@
#define MATRIX(self) ((cairo_matrix_t *)IoObject_dataPointer(self))
+static const char *protoId = "CairoMatrix";
void *IoMessage_locals_cairoMatrixArgAt_(IoMessage *self, void *locals, int n)
{
@@ -20,7 +21,7 @@ void *IoMessage_locals_cairoMatrixArgAt_(IoMessage *self, void *locals, int n)
static IoTag *IoCairoMatrix_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoMatrix");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoMatrix_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoMatrix_rawClone);
@@ -68,12 +69,12 @@ IoCairoMatrix *IoCairoMatrix_rawClone(IoCairoMatrix *proto)
IoCairoMatrix *IoCairoMatrix_new(void *state)
{
- return IoState_protoWithInitFunction_(state, IoCairoMatrix_proto);
+ return IoState_protoWithId_(state, protoId);
}
IoCairoMatrix *IoCairoMatrix_newWithRawMatrix_(void *state, cairo_matrix_t *matrix)
{
- IoCairoMatrix *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoMatrix_proto));
+ IoCairoMatrix *self = IOCLONE(IoState_protoWithId_(state, protoId));
memcpy(MATRIX(self), matrix, sizeof(cairo_matrix_t));
return self;
}
View
5 addons/Cairo/source/IoCairoPath.c
@@ -11,6 +11,7 @@
#define DATA(self) ((IoCairoPathData *)IoObject_dataPointer(self))
#define PATH(self) (DATA(self)->path)
+static const char *protoId = "CairoPath";
void *IoMessage_locals_cairoPathArgAt_(IoMessage *self, void *locals, int n)
{
@@ -23,7 +24,7 @@ void *IoMessage_locals_cairoPathArgAt_(IoMessage *self, void *locals, int n)
static IoTag *IoCairoPath_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoPath");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoPath_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoPath_free);
@@ -66,7 +67,7 @@ IoCairoPath *IoCairoPath_newWithRawPath_(void *state, cairo_path_t *path)
checkStatus_(state, 0, path->status);
- self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoPath_proto));
+ self = IOCLONE(IoState_protoWithInitId_(state, protoId));
IoObject_setDataPointer_(self, calloc(1, sizeof(IoCairoPathData)));
DATA(self)->path = path;
DATA(self)->refCount = 1;
View
6 addons/Cairo/source/IoCairoPathElement.c
@@ -11,12 +11,14 @@
#define DATA(self) ((IoCairoPathElementData *)IoObject_dataPointer(self))
#define PATH_DATA(self) (DATA(self)->pathData)
+static const char *protoId = "CairoPathElement";
+
static int IoCairoPathElement_pointCount(IoCairoPathElement *self);
static IoTag *IoCairoPathElement_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoPathElement");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoPathElement_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoPathElement_free);
@@ -53,7 +55,7 @@ IoCairoPathElement *IoCairoPathElement_rawClone(IoCairoPathElement *proto)
IoCairoPathElement *IoCairoPathElement_newWithPath_dataOffset_(void *state, IoObject *path, int offset)
{
- IoCairoPathElement *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoPathElement_proto));
+ IoCairoPathElement *self = IOCLONE(IoState_protoWithId_(state, protoId));
cairo_path_t *rawPath = ((IoCairoPathData *)IoObject_dataPointer(path))->path;
IoObject_setDataPointer_(self, malloc(sizeof(IoCairoPathElementData)));
View
5 addons/Cairo/source/IoCairoPattern.c
@@ -15,10 +15,11 @@
#define DATA(self) ((IoCairoPatternData *)IoObject_dataPointer(self))
+static const char *protoId = "CairoPattern";
IoTag *IoCairoPattern_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoPattern");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoPattern_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoPattern_free);
@@ -79,7 +80,7 @@ IoCairoPattern *IoCairoPattern_newWithRawPattern_(void *state, IoMessage *m, cai
IoState_error_(state, 0, "Unsupported pattern type");
}
- self = IOCLONE(IoState_protoWithInitFunction_(state, initFunc));
+ self = IOCLONE(IoState_protoWithId_(state, protoId));
IoObject_setDataPointer_(self, pattern);
return self;
}
View
5 addons/Cairo/source/IoCairoRectangle.c
@@ -7,10 +7,11 @@
#define RECT(self) ((cairo_rectangle_t *)IoObject_dataPointer(self))
+static const char *protoId = "CairoRectangle";
static IoTag *IoCairoRectangle_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoRectangle");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoRectangle_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoRectangle_free);
@@ -48,7 +49,7 @@ IoCairoRectangle *IoCairoRectangle_rawClone(IoCairoRectangle *proto)
IoCairoRectangle *IoCairoRectangle_newWithRawRectangle_(void *state, cairo_rectangle_t *rect)
{
- IoCairoRectangle *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoRectangle_proto));
+ IoCairoRectangle *self = IOCLONE(IoState_protoWithId_(state, protoId));
memcpy(RECT(self), rect, sizeof(cairo_rectangle_t));
return self;
}
View
5 addons/Cairo/source/IoCairoScaledFont.c
@@ -17,6 +17,7 @@
#define FONT(self) ((cairo_scaled_font_t *)IoObject_dataPointer(self))
#define CHECK_STATUS(self) checkStatus_(IOSTATE, m, cairo_scaled_font_status(FONT(self)))
+static const char *protoId = "CairoScaledFont";
void *IoMessage_locals_cairoScaledFontArgAt_(IoMessage *self, void *locals, int n)
{
@@ -29,7 +30,7 @@ void *IoMessage_locals_cairoScaledFontArgAt_(IoMessage *self, void *locals, int
static IoTag *IoCairoScaledFont_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoScaledFont");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoScaledFont_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoScaledFont_rawClone);
@@ -75,7 +76,7 @@ IoCairoScaledFont *IoCairoScaledFont_rawClone(IoCairoScaledFont *proto)
IoCairoScaledFont *IoCairoScaledFont_newWithRawScaledFont_(void *state, IoMessage *m, cairo_scaled_font_t *font)
{
- IoCairoScaledFont *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoScaledFont_proto));
+ IoCairoScaledFont *self = IOCLONE(IoState_protoWithId_(state, protoId));
IoObject_setDataPointer_(self, font);
CHECK_STATUS(self);
return self;
View
5 addons/Cairo/source/IoCairoSurface.c
@@ -13,10 +13,11 @@
#include "IoCairoPDFSurface.h"
#include "IoCairoSVGSurface.h"
+static const char *protoId = "CairoSurface";
static IoTag *IoCairoSurface_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoSurface");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoSurface_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoSurface_free);
@@ -92,7 +93,7 @@ IoCairoSurface *IoCairoSurface_newWithRawSurface_(void *state, IoMessage *m, cai
IoState_error_(state, 0, "Unsupported surface type");
}
- self = IOCLONE(IoState_protoWithInitFunction_(state, initFunc));
+ self = IOCLONE(IoState_protoWithId_(state, protoId));
IoObject_setDataPointer_(self, surface);
return self;
}
View
5 addons/Cairo/source/IoCairoTextExtents.c
@@ -7,10 +7,11 @@
#define EXTENTS(self) ((cairo_text_extents_t *)IoObject_dataPointer(self))
+static const char *protoId = "CairoTextExtents";
static IoTag *IoCairoTextExtents_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("CairoTextExtents");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCairoTextExtents_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCairoTextExtents_free);
@@ -50,7 +51,7 @@ IoCairoTextExtents *IoCairoTextExtents_rawClone(IoCairoTextExtents *proto)
IoCairoTextExtents *IoCairoTextExtents_newWithRawTextExtents(void *state, cairo_text_extents_t *extents)
{
- IoCairoTextExtents *self = IOCLONE(IoState_protoWithInitFunction_(state, IoCairoTextExtents_proto));
+ IoCairoTextExtents *self = IOCLONE(IoState_protoWithId_(state, protoId));
memcpy(EXTENTS(self), extents, sizeof(cairo_text_extents_t));
return self;
}
View
6 addons/Clutter/source/IoClutter.c
@@ -20,9 +20,11 @@ For detailed docs, see <a href="http://clutter-project.org/docs/clutter/stable/"
</p>
*/
+static const char *protoId = "Clutter";
+
/*** Initalisation functions ***/
IoTag *IoClutter_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("Clutter");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutter_free);
@@ -83,7 +85,7 @@ IoClutter *IoClutter_rawClone(IoClutter *proto) {
}
IoClutter *IoClutter_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutter_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterActor.c
@@ -2,9 +2,11 @@
//metadoc ClutterActor category UserInterface
//metadoc ClutterActor description For more detailed docs see <a href="http://clutter-project.org/docs/clutter/stable/ClutterActor.html">Clutter documentation</a>.
+static const char *protoId = "ClutterActor";
+
/*** Initalisation functions ***/
IoTag *IoClutterActor_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterActor");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterActor_free);
@@ -106,7 +108,7 @@ IoClutterActor *IoClutterActor_rawClone(IoClutterActor *proto) {
}
IoClutterActor *IoClutterActor_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterActor_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterActorBox.c
@@ -2,9 +2,11 @@
//metadoc ClutterActorBox category UserInterface
//metadoc ClutterActorBox description For more detailed docs see <a href="http://clutter-project.org/docs/clutter/stable/ClutterActor.html#ClutterActorBox">Clutter documentation</a>.
+static const char *protoId = "ClutterActorBox";
+
/*** Initalisation functions ***/
IoTag *IoClutterActorBox_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterActorBox");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterActorBox_free);
@@ -43,7 +45,7 @@ IoClutterActorBox *IoClutterActorBox_rawClone(IoClutterActorBox *proto) {
}
IoClutterActorBox *IoClutterActorBox_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterActorBox_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterColor.c
@@ -1,6 +1,8 @@
#include "IoClutterColor.h"
#define DATA(self) ((IoClutterColorData*)IoObject_dataPointer(self))
+static const char *protoId = "ClutterColor";
+
//metadoc ClutterColor category UserInterface
/*metadoc ClutterColor description
<p>
@@ -11,7 +13,7 @@ blue := "#00f" asClutterColor
/*** Initalisation functions ***/
IoTag *IoClutterColor_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterColor");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterColor_free);
@@ -65,7 +67,7 @@ IoClutterColor *IoClutterColor_rawClone(IoClutterColor *proto) {
}
IoClutterColor *IoClutterColor_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterColor_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterEvent.c
@@ -2,9 +2,11 @@
//metadoc ClutterEvent category UserInterface
//metadoc ClutterEvent description For more detailed docs see <a href="http://clutter-project.org/docs/clutter/stable/clutter-Events.html">Clutter documentation</a>.
+static const char *protoId = "ClutterEvent";
+
/*** Initalisation functions ***/
IoTag *IoClutterEvent_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterEvent");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterEvent_free);
@@ -55,7 +57,7 @@ IoClutterEvent *IoClutterEvent_rawClone(IoClutterEvent *proto) {
}
IoClutterEvent *IoClutterEvent_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterEvent_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterInputDevice.c
@@ -2,9 +2,11 @@
//metadoc ClutterInputDevice category UserInterface
//metadoc ClutterInputDevice description For more detailed docs see <a href="http://clutter-project.org/docs/clutter/stable/ClutterInputDevice.html">Clutter documentation</a>.
+static const char *protoId = "ClutterInputDevice";
+
/*** Initalisation functions ***/
IoTag *IoClutterInputDevice_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterInputDevice");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterInputDevice_free);
@@ -37,7 +39,7 @@ IoClutterInputDevice *IoClutterInputDevice_rawClone(IoClutterInputDevice *proto)
}
IoClutterInputDevice *IoClutterInputDevice_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterInputDevice_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterShader.c
@@ -2,9 +2,11 @@
//metadoc ClutterShader category UserInterface
//metadoc ClutterShader description For more detailed docs see <a href="http://clutter-project.org/docs/clutter/stable/clutter-Shaders.html">Clutter documentation</a>.
+static const char *protoId = "ClutterShader";
+
/*** Initalisation functions ***/
IoTag *IoClutterShader_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterShader");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterShader_free);
@@ -49,7 +51,7 @@ IoClutterShader *IoClutterShader_rawClone(IoClutterShader *proto) {
}
IoClutterShader *IoClutterShader_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterShader_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterStage.c
@@ -2,9 +2,11 @@
//metadoc ClutterStage category UserInterface
//metadoc ClutterStage description For more detailed docs see <a href="http://clutter-project.org/docs/clutter/stable/ClutterStage.html">Clutter documentation</a>.
+static const char *protoId = "ClutterStage";
+
/*** Initalisation functions ***/
IoTag *IoClutterStage_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterStage");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterActor_free);
@@ -42,7 +44,7 @@ IoClutterStage *IoClutterStage_rawClone(IoClutterStage *proto) {
}
IoClutterStage *IoClutterStage_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterStage_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterUnits.c
@@ -7,9 +7,11 @@
<pre><code>ClutterActor clone setWidth((10 px + 1 em) value)</code></pre>
*/
+static const char *protoId = "ClutterUnits";
+
/*** Initalisation functions ***/
IoTag *IoClutterUnits_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterUnits");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterUnits_free);
@@ -64,7 +66,7 @@ IoClutterUnits *IoClutterUnits_rawClone(IoClutterUnits *proto) {
}
IoClutterUnits *IoClutterUnits_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterUnits_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Clutter/source/IoClutterVertex.c
@@ -2,9 +2,11 @@
//metadoc ClutterVertex category UserInterface
//metadoc ClutterVertex description For more detailed docs see <a href="http://clutter-project.org/docs/clutter/stable/ClutterActor.html#ClutterVertex">Clutter documentation</a>.
+static const char *protoId = "ClutterVertex";
+
/*** Initalisation functions ***/
IoTag *IoClutterVertex_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("ClutterVertex");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoClutterVertex_free);
@@ -46,7 +48,7 @@ IoClutterVertex *IoClutterVertex_rawClone(IoClutterVertex *proto) {
}
IoClutterVertex *IoClutterVertex_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoClutterVertex_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Loudmouth/source/IoLoudmouth.c
@@ -1,6 +1,8 @@
#include "IoLoudmouth.h"
#define LMCONN(self) ((LmConnection *) IoObject_dataPointer(self))
+static const char *protoId = "Loudmouth";
+
/*** Helper functions ***/
LmMessageType str2msg_type(char *str) {
if(!strcmp(str, "message")) return LM_MESSAGE_TYPE_MESSAGE;
@@ -103,7 +105,7 @@ LmSSLResponse onSslError(LmSSL *ssl, LmSSLStatus status, void* data) {
/*** Initialisation functions ***/
IoTag *IoLoudmouth_newTag(void *state) {
- IoTag *tag = IoTag_newWithName_("Loudmouth");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoLoudmouth_free);
@@ -152,7 +154,7 @@ IoLoudmouth *IoLoudmouth_rawClone(IoLoudmouth *proto) {
}
IoLoudmouth *IoLoudmouth_new(void *state) {
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoLoudmouth_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
View
6 addons/Memcached/source/IoMemcached.c
@@ -25,9 +25,11 @@ based on C <a href="http://tangent.org/552/libmemcached.html">libmemcached</a>.
#define _FLAG_BOOLEAN 3
#define _FLAG_OBJECT 4
+static const char *protoId = "Memcached";
+
IoTag *IoMemcached_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Memcached");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoMemcached_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoMemcached_rawClone);
@@ -82,7 +84,7 @@ IoObject *IoMemcached_rawClone(IoMemcached *proto)
IoObject *IoMemcached_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoMemcached_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
6 addons/MySQL/source/IoMySQL.c
@@ -28,8 +28,10 @@ my close
#define DATA(self) ((IoMySQLData*) IoObject_dataPointer(self))
+static const char *protoId = "MySQL";
+
IoTag* IoMySQL_newTag(void* state) {
- IoTag* tag = IoTag_newWithName_("MySQL");
+ IoTag* tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc*) IoMySQL_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc*) IoMySQL_rawClone);
@@ -68,7 +70,7 @@ IoObject* IoMySQL_rawClone(IoObject* proto) {
IoObject* IoMySQL_new(void* state)
{
- IoObject* proto = IoState_protoWithInitFunction_(state, IoMySQL_proto);
+ IoObject* proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
6 addons/NetworkAdapter/source/IoNetworkAdapter.c
@@ -11,9 +11,11 @@ Interface to network adapter functionality.
#include "OSXMacAddress.h"
#include "WindowsMacAddress.h"
+static const char *protoId = "NetworkAdapter";
+
IoTag *IoNetworkAdapter_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("NetworkAdapter");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoNetworkAdapter_rawClone);
return tag;
@@ -44,7 +46,7 @@ IoNetworkAdapter *IoNetworkAdapter_rawClone(IoNetworkAdapter *proto)
IoNetworkAdapter *IoNetworkAdapter_new(void *state)
{
- IoNetworkAdapter *proto = IoState_protoWithInitFunction_(state, IoNetworkAdapter_proto);
+ IoNetworkAdapter *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
6 addons/NullAddon/source/IoNullAddon.c
@@ -19,6 +19,8 @@ one method, hello, which does the obvious job of greeting the world.
*/
#define DATA(self) ((IoNullAddonData *)IoObject_dataPointer(self))
+static const char *protoId = "NullAddon";
+
/*
* IoTag structures are type descriptors, which includes the linkages
* necessary to:
@@ -30,7 +32,7 @@ one method, hello, which does the obvious job of greeting the world.
IoTag *IoNullAddon_newTag(void *state)
{
/* The tag name determines the type name. */
- IoTag *tag = IoTag_newWithName_("NullAddon");
+ IoTag *tag = IoTag_newWithName_(protoId);
/* Since some functions don't accept an explicit IoState parameter,
* we rely on back-links to provide access to the containing state.
@@ -153,7 +155,7 @@ IoNullAddon *IoNullAddon_rawClone(IoNullAddon *proto)
*/
IoNullAddon *IoNullAddon_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoNullAddon_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
View
6 addons/Oauth/source/IoOauth.c
@@ -19,9 +19,11 @@ out := digest OauthString
#define DATA(self) ((Oauth *)IoObject_dataPointer(self))
+static const char *protoId = "Oauth";
+
IoTag *IoOauth_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Oauth");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoOauth_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoOauth_rawClone);
@@ -80,7 +82,7 @@ IoOauth *IoOauth_rawClone(IoOauth *proto)
IoOauth *IoOauth_new(void *state)
{
- IoOauth *proto = IoState_protoWithInitFunction_(state, IoOauth_proto);
+ IoOauth *proto = IoState_protoWithId_(state, proto);
return IOCLONE(proto);
}
View
1 addons/SQLite3/source/IoSQLite3.c
@@ -210,7 +210,6 @@ void IoSQLite3_justOpen(IoSQLite3 *self)
sqlite3_busy_handler(DATA(self)->db, IoSQLite3_busyHandler, self);
sqlite3_busy_timeout(DATA(self)->db, DATA(self)->timeoutSeconds * 1000);
- return self;
}
View
6 addons/SecureSocket/source/IoCertificate.c
@@ -14,6 +14,8 @@ Read-only interface to SSL X509 certificates.
#include "IoDate.h"
#include "common.h"
+static const char *protoId = "Certificate";
+
IoCertificate *IoMessage_locals_certificateArgAt_(IoMessage *self, IoObject *locals, int n)
{
IoObject *v = IoMessage_locals_valueArgAt_(self, locals, n);
@@ -37,7 +39,7 @@ typedef struct {
IoTag *IoCertificate_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("Certificate");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoCertificate_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoCertificate_rawClone);
@@ -103,7 +105,7 @@ void IoCertificate_free(IoCertificate *self)
IoCertificate *IoCertificate_newWithX509_shouldFree(void *state, X509 *x509, int shouldFree)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoCertificate_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
IoCertificate *self = IOCLONE(proto);
Certificate *certData = calloc(1, sizeof(Certificate));
certData->shouldFree = shouldFree;
View
8 addons/SecureSocket/source/IoSecureSocket.c
@@ -31,6 +31,8 @@ A SecureSocket is a wrapper on an OpenSSL SSL object and supports both TLSv1 and
#include "IoSocket.h"
#include "common.h"
+static const char *protoId = "SecureSocket";
+
IoSecureSocket *IoMessage_locals_secureSocketArgAt_(IoMessage *self, IoObject *locals, int n)
{
IoObject *v = IoMessage_locals_valueArgAt_(self, locals, n);
@@ -59,7 +61,7 @@ SSL *IoSecureSocket_SSL(IoSecureSocket *self)
IoTag *IoSecureSocket_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("SecureSocket");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoSecureSocket_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoSecureSocket_rawClone);
@@ -188,7 +190,7 @@ IoSecureSocket *IoSecureSocket_rawClone(IoSecureSocket *proto)
IoSecureSocket *IoSecureSocket_newWithCTX_(void *state, SSL_CTX *ctx)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoSecureSocket_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
IoSecureSocket *self = IOCLONE(proto);
SecureSocket *ssock = (SecureSocket *)calloc(1, sizeof(SecureSocket));
IoObject_setDataPointer_(self, ssock);
@@ -205,7 +207,7 @@ IoSecureSocket *IoSecureSocket_newWithCTX_(void *state, SSL_CTX *ctx)
IoSecureSocket *IoSecureSocket_newWithSSL_IP_(void *state, SSL *ssl, IoIPAddress *ip)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoSecureSocket_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
IoSecureSocket *self = IOCLONE(proto);
SecureSocket *ssock = (SecureSocket *)calloc(1, sizeof(SecureSocket));
ssock->ssl = ssl;
View
6 addons/Socket/source/new/IoEvDNS.c
@@ -12,9 +12,11 @@
#define DNS(self) ((struct evdns_base *)IoObject_dataPointer(self))
+static const char *protoId = "EvDNS";
+
IoTag *IoEvDNS_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("EvDNS");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoEvDNS_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoEvDNS_free);
@@ -52,7 +54,7 @@ IoEvDNS *IoEvDNS_rawClone(IoEvDNS *proto)
IoEvDNS *IoEvDNS_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoEvDNS_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return self; // singleton
}
View
8 addons/Socket/source/new/IoEvDNSRequest.c
@@ -12,11 +12,13 @@
#define REQUEST(self) ((struct evdns_request *)IoObject_dataPointer(self))
-EvDNSRequest_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
+EvDNSRequest_resolv_conf_parse(DNS_OPTIONS_ALL, "/etc/resolv.conf");
+
+static const char *protoId = "EvDNSRequest";
IoTag *IoEvDNSRequest_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("EvDNSRequest");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoEvDNSRequest_rawClone);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoEvDNSRequest_free);
@@ -59,7 +61,7 @@ IoEvDNSRequest *IoEvDNSRequest_rawClone(IoEvDNSRequest *proto)
IoEvDNSRequest *IoEvDNSRequest_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoEvDNSRequest_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}

0 comments on commit 7e824d2

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