Permalink
Browse files

fixes for proto init function name change

  • Loading branch information...
1 parent 7c0a055 commit 838ebe34742538a34a1176acfa9d716e1e98fcbd @stevedekorte committed Jan 20, 2012
@@ -12,10 +12,11 @@
#define DATA(self) ((IoRegexMatchData *)IoObject_dataPointer(self))
+static const char *protoId = "RegexMatch";
IoTag *IoRegexMatch_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("RegexMatch");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoRegexMatch_rawClone);
IoTag_markFunc_(tag, (IoTagMarkFunc *)IoRegexMatch_mark);
@@ -61,7 +62,7 @@ IoRegexMatch *IoRegexMatch_rawClone(IoRegexMatch *proto)
IoRegexMatch *IoRegexMatch_newWithRegex_subject_captureRanges_(void *state, IoRegex *regex, IoSymbol *subject, IoList *captureRanges)
{
- IoRegexMatch *self = IOCLONE(IoState_protoWithInitFunction_(state, IoRegexMatch_proto));
+ IoRegexMatch *self = IOCLONE(IoState_protoWithId_(state, protoId));
DATA(self)->regex = IOREF(regex);
DATA(self)->subject = IOREF(subject);
DATA(self)->ranges = captureRanges;
@@ -15,6 +15,8 @@
#define DATA(self) ((IoRegexMatchesData *)IoObject_dataPointer(self))
+static const char *protoId = "RegexMatches";
+
static IoRegexMatch *IoRegexMatches_search(IoRegex *self, IoMessage *m);
static IoRegexMatch *IoRegexMatches_searchWithOptions_(IoRegex *self, IoMessage *m, int options);
static IoRegexMatch *IoRegexMatches_searchFrom_withOptions_(IoRegexMatches *self, IoMessage *m, int position, int options);
@@ -24,7 +26,7 @@ static IoObject *IoRegexMatches_rawsetPosition_(IoRegexMatches *self, int positi
IoTag *IoRegexMatches_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("RegexMatches");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoRegexMatches_rawClone);
IoTag_markFunc_(tag, (IoTagMarkFunc *)IoRegexMatches_mark);
@@ -92,7 +94,7 @@ IoRegexMatches *IoRegexMatches_rawClone(IoRegexMatches *proto)
IoRegexMatches *IoRegexMatches_new(void *state)
{
- IoRegexMatches *proto = IoState_protoWithInitFunction_(state, IoRegexMatches_proto);
+ IoRegexMatches *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -16,16 +16,18 @@ A wrapper around the libtheora th_comment object.
#define DATA(self) ((th_comment*)(IoObject_dataPointer(self)))
+static const char *protoId = "TheoraComment";
+
IoObject *IoMessage_locals_theoraCommentArgAt_(IoMessage *self, IoObject *locals, int n)
{
IoObject* v = IoMessage_locals_valueArgAt_(self, locals, n);
- if (!ISTHEORACOMMENT(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, "TheoraComment");
+ if (!ISTHEORACOMMENT(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, protoId);
return v;
}
IoTag *IoTheoraComment_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("TheoraComment");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoTheoraComment_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoTheoraComment_rawClone);
@@ -41,7 +43,7 @@ IoTheoraComment *IoTheoraComment_proto(void *state)
// th_comment_init(data);
IoObject_setDataPointer_(self, data);
- IoState_registerProtoWithFunc_(state, self, IoTheoraComment_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
@@ -65,7 +67,7 @@ IoTheoraComment *IoTheoraComment_rawClone(IoTheoraComment *proto)
IoTheoraComment *IoTheoraComment_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoTheoraComment_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -27,17 +27,19 @@ typedef struct
#define DATA(self) ((IoTheoraDecodeContextData*)(IoObject_dataPointer(self)))
+static const char *protoId = "TheoraDecodeContext";
+
IoObject *IoMessage_locals_theoraDecodeContextArgAt_(IoMessage *self, IoObject *locals, int n)
{
IoObject* v = IoMessage_locals_valueArgAt_(self, locals, n);
- if (!ISTHEORADECODECONTEXT(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, "TheoraDecodeContext");
+ if (!ISTHEORADECODECONTEXT(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, protoId);
return v;
}
IoTag *IoTheoraDecodeContext_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("TheoraDecodeContext");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoTheoraDecodeContext_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoTheoraDecodeContext_rawClone);
@@ -52,7 +54,7 @@ IoTheoraDecodeContext *IoTheoraDecodeContext_proto(void *state)
IoTheoraDecodeContextData* data = calloc(1, sizeof(IoTheoraDecodeContextData));
IoObject_setDataPointer_(self, data);
- IoState_registerProtoWithFunc_(state, self, IoTheoraDecodeContext_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
@@ -78,7 +80,7 @@ IoTheoraDecodeContext *IoTheoraDecodeContext_rawClone(IoTheoraDecodeContext *pro
IoTheoraDecodeContext *IoTheoraDecodeContext_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoTheoraDecodeContext_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -16,16 +16,18 @@ A wrapper around the libtheora th_info object.
#define DATA(self) ((th_info*)(IoObject_dataPointer(self)))
+static const char *protoId = "TheoraInfo";
+
IoObject *IoMessage_locals_theoraInfoArgAt_(IoMessage *self, IoObject *locals, int n)
{
IoObject* v = IoMessage_locals_valueArgAt_(self, locals, n);
- if (!ISTHEORAINFO(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, "TheoraInfo");
+ if (!ISTHEORAINFO(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, protoId);
return v;
}
IoTag *IoTheoraInfo_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("TheoraInfo");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoTheoraInfo_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoTheoraInfo_rawClone);
@@ -41,7 +43,7 @@ IoTheoraInfo *IoTheoraInfo_proto(void *state)
th_info_init(data);
IoObject_setDataPointer_(self, data);
- IoState_registerProtoWithFunc_(state, self, IoTheoraInfo_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
@@ -67,7 +69,7 @@ IoTheoraInfo *IoTheoraInfo_rawClone(IoTheoraInfo *proto)
IoTheoraInfo *IoTheoraInfo_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoTheoraInfo_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -16,16 +16,18 @@ A wrapper around the libtheora th_setup_info object.
#define DATA(self) ((th_setup_info**)(IoObject_dataPointer(self)))
+static const char *protoId = "TheoraSetupInfo";
+
IoObject *IoMessage_locals_theoraSetupInfoArgAt_(IoMessage *self, IoObject *locals, int n)
{
IoObject* v = IoMessage_locals_valueArgAt_(self, locals, n);
- if (!ISTHEORASETUPINFO(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, "TheoraSetupInfo");
+ if (!ISTHEORASETUPINFO(v)) IoMessage_locals_numberArgAt_errorForType_(self, locals, n, protoId);
return v;
}
IoTag *IoTheoraSetupInfo_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("TheoraSetupInfo");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoTheoraSetupInfo_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoTheoraSetupInfo_rawClone);
@@ -40,7 +42,7 @@ IoTheoraSetupInfo *IoTheoraSetupInfo_proto(void *state)
th_setup_info** data = calloc(1, sizeof(th_setup_info*));
IoObject_setDataPointer_(self, data);
- IoState_registerProtoWithFunc_(state, self, IoTheoraSetupInfo_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
{
IoMethodTable methodTable[] = {
@@ -62,7 +64,7 @@ IoTheoraSetupInfo *IoTheoraSetupInfo_rawClone(IoTheoraSetupInfo *proto)
IoTheoraSetupInfo *IoTheoraSetupInfo_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_(state, IoTheoraSetupInfo_proto);
+ IoObject *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
@@ -22,6 +22,8 @@ An ordered key/value database that supports transactions and arbitrary key and v
#define TokyoCabinet(self) ((TCBDB *)(IoObject_dataPointer(self)))
+static const char *protoId = "TokyoCabinet";
+
static int pathCompare(const char *p1, const char *p2, char sepChar, void *op)
{
int i;
@@ -162,7 +164,7 @@ static int compareStrNumFunc(const char *a, int asize, const char *b, int bsize,
IoTag *IoTokyoCabinet_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("TokyoCabinet");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoTokyoCabinet_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoTokyoCabinet_rawClone);
@@ -201,7 +203,7 @@ IoTokyoCabinet *IoTokyoCabinet_proto(void *state)
IoObject_tag_(self, IoTokyoCabinet_newTag(state));
IoObject_setDataPointer_(self, NULL);
- IoState_registerProtoWithFunc_((IoState *)state, self, IoTokyoCabinet_proto);
+ IoState_registerProtoWithId_((IoState *)state, self, protoId);
IoObject_addMethodTable_(self, methodTable);
return self;
@@ -217,7 +219,7 @@ IoTokyoCabinet *IoTokyoCabinet_rawClone(IoTokyoCabinet *proto)
IoTokyoCabinet *IoTokyoCabinet_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoTokyoCabinet_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
@@ -1,4 +1,3 @@
-
//metadoc TokyoCabinetCursor category Databases
//metadoc TokyoCabinetCursor copyright Steve Dekorte 2002
//metadoc TokyoCabinetCursor license BSD revised
@@ -24,9 +23,11 @@ A database cursor.
#define TokyoCabinetCursor(self) ((BDBCUR *)(IoObject_dataPointer(self)))
#define TokyoCabinet(self) (((BDBCUR *)(IoObject_dataPointer(self)))->bdb)
+static const char *protoId = "TokyoCabinetCursor";
+
IoTag *IoTokyoCabinetCursor_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("TokyoCabinetCursor");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoTokyoCabinetCursor_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoTokyoCabinetCursor_rawClone);
@@ -55,7 +56,7 @@ IoTokyoCabinetCursor *IoTokyoCabinetCursor_proto(void *state)
IoObject_tag_(self, IoTokyoCabinetCursor_newTag(state));
IoObject_setDataPointer_(self, NULL);
- IoState_registerProtoWithFunc_((IoState *)state, self, IoTokyoCabinetCursor_proto);
+ IoState_registerProtoWithId_((IoState *)state, self, protoId);
IoObject_addMethodTable_(self, methodTable);
return self;
@@ -71,7 +72,7 @@ IoTokyoCabinetCursor *IoTokyoCabinetCursor_rawClone(IoTokyoCabinetCursor *proto)
IoTokyoCabinetCursor *IoTokyoCabinetCursor_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoTokyoCabinetCursor_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
@@ -24,9 +24,11 @@ A database cursor.
#define TokyoCabinetPrefixCursor(self) ((BDBCUR *)(IoObject_dataPointer(self)))
#define TokyoCabinet(self) (((BDBCUR *)(IoObject_dataPointer(self)))->bdb)
+static const char *protoId = "TokyoCabinetPrefixCursor";
+
IoTag *IoTokyoCabinetPrefixCursor_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("TokyoCabinetPrefixCursor");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoTokyoCabinetPrefixCursor_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoTokyoCabinetPrefixCursor_rawClone);
@@ -55,7 +57,7 @@ IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_proto(void *state)
IoObject_tag_(self, IoTokyoCabinetPrefixCursor_newTag(state));
IoObject_setDataPointer_(self, NULL);
- IoState_registerProtoWithFunc_((IoState *)state, self, IoTokyoCabinetPrefixCursor_proto);
+ IoState_registerProtoWithId_((IoState *)state, self, protoId);
IoObject_addMethodTable_(self, methodTable);
return self;
@@ -71,7 +73,7 @@ IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_rawClone(IoTokyoCabinetPr
IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_new(void *state)
{
- IoObject *proto = IoState_protoWithInitFunction_((IoState *)state, IoTokyoCabinetPrefixCursor_proto);
+ IoObject *proto = IoState_protoWithId_((IoState *)state, protoId);
return IOCLONE(proto);
}
@@ -11,9 +11,11 @@
#define PARSER(self) (HttpParser *)IoObject_dataPointer(self)
#define IOSEQDATA(self) ((UArray *)(IoObject_dataPointer(self)))
+static const char *protoId = "HttpParser";
+
IoTag *IoHttpParser_newTag(void *state)
{
- IoTag *tag = IoTag_newWithName_("HttpParser");
+ IoTag *tag = IoTag_newWithName_(protoId);
IoTag_state_(tag, state);
IoTag_freeFunc_(tag, (IoTagFreeFunc *)IoHttpParser_free);
IoTag_cloneFunc_(tag, (IoTagCloneFunc *)IoHttpParser_rawClone);
@@ -26,7 +28,7 @@ IoHttpParser *IoHttpParser_proto(void *state)
IoObject_tag_(self, IoHttpParser_newTag(state));
- IoState_registerProtoWithFunc_(state, self, IoHttpParser_proto);
+ IoState_registerProtoWithId_(state, self, protoId);
IoHttpParser_initState(self);
@@ -53,7 +55,7 @@ IoHttpParser *IoHttpParser_rawClone(IoHttpParser *proto)
IoHttpParser *IoHttpParser_new(void *state)
{
- IoHttpParser *proto = IoState_protoWithInitFunction_(state, IoHttpParser_proto);
+ IoHttpParser *proto = IoState_protoWithId_(state, protoId);
return IOCLONE(proto);
}
Oops, something went wrong.

0 comments on commit 838ebe3

Please sign in to comment.