IoVorbisBlock *IoVorbisBlock_rawClone(IoVorbisBlock *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); vorbis_block* data = calloc(1, sizeof(vorbis_block)); IoObject_setDataPointer_(self, data); return self; }
IoTokyoCabinetPrefixCursor *IoTokyoCabinetPrefixCursor_rawClone(IoTokyoCabinetPrefixCursor *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_tag_(self, IoObject_tag(proto)); IoObject_setDataPointer_(self, tcbdbnew()); return self; }
IoList *IoList_rawClone(IoList *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_tag_(self, IoObject_tag(proto)); IoObject_setDataPointer_(self, List_clone(DATA(proto))); return self; }
IoSkipDB *IoSkipDB_rawClone(IoSkipDB *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_tag_(self, IoObject_tag(proto)); IoObject_setDataPointer_(self, NULL); return self; }
IoOggPacket *IoOggPacket_rawClone(IoOggPacket *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); ogg_packet* data = calloc(1, sizeof(ogg_packet)); IoObject_setDataPointer_(self, data); return self; }
IoSHA1 *IoSHA1_rawClone(IoSHA1 *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoSHA1Data))); SHA1Init(&(DATA(self)->context)); return self; }
IoDuration *IoDuration_rawClone(IoDuration *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, Duration_new()); Duration_copy_(DATA(self), DATA(proto)); return self; }
IoClutterColor *IoClutterColor_rawClone(IoClutterColor *proto) { IoClutterColor *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoClutterColorData))); return self; }
IoSkipDBM *IoSkipDBM_rawClone(IoSkipDBM *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_tag_(self, IoObject_tag(proto)); IoObject_setDataPointer_(self, SkipDBM_new()); return self; }
// _rawClone clones the existing proto passed as the only argument IoObject *IoCInvokeStructureInstance_rawClone(IoCInvokeStructureInstance *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoCInvokeStructureInstanceData))); return self; }
IoTheoraDecodeContext *IoTheoraDecodeContext_rawClone(IoTheoraDecodeContext *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoTheoraDecodeContextData* data = calloc(1, sizeof(IoTheoraDecodeContextData)); IoObject_setDataPointer_(self, data); return self; }
IoCairoFontOptions *IoCairoFontOptions_rawClone(IoCairoFontOptions *proto) { IoCairoFontOptions *self = IoObject_rawClonePrimitive(proto); if (OPTIONS(proto)) IoObject_setDataPointer_(self, cairo_font_options_copy(OPTIONS(proto))); return self; }
IoCFunction *IoCFunction_rawClone(IoCFunction *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(DATA(proto), sizeof(IoCFunctionData))); IoObject_isActivatable_(self, 1); return self; }
IoAudioMixer *IoAudioMixer_rawClone(IoAudioMixer *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); self->data = cpalloc(proto->data, sizeof(IoAudioMixerData)); DATA(self)->ioBuffer = IoSeq_new(IOSTATE); DATA(self)->buffer = IoSeq_rawUArray(DATA(self)->ioBuffer); DATA(proto)->mixBuffer = UArray_new(); DATA(self)->writeMessage = IoMessage_newWithName_label_(IOSTATE, IOSYMBOL("write"), IOSYMBOL("AudioMixer")); IoMessage_setCachedArg_to_(DATA(self)->writeMessage, 0, DATA(self)->ioBuffer); DATA(self)->nonBlockingWriteMessage = IoMessage_newWithName_label_(IOSTATE, IOSYMBOL("nonBlockingWrite"), IOSYMBOL("AudioMixer")); IoMessage_setCachedArg_to_(DATA(self)->nonBlockingWriteMessage, 0, DATA(self)->ioBuffer); DATA(self)->sounds = List_new(); DATA(self)->soundsToRemove = List_new(); DATA(self)->events = List_new(); DATA(self)->activeEvents = List_new(); DATA(self)->volume = DATA(self)->volume; DATA(self)->soundTouch = SoundTouch_init(); SoundTouch_setSampleRate(DATA(self)->soundTouch, 44100); SoundTouch_setChannels(DATA(self)->soundTouch, 2); DATA(self)->tempo = 1.0; IoState_addValue_(IOSTATE, self); return self; }
IoTheoraSetupInfo *IoTheoraSetupInfo_rawClone(IoTheoraSetupInfo *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); th_setup_info** data = calloc(1, sizeof(th_setup_info*)); IoObject_setDataPointer_(self, data); return self; }
IoCInvokeStructure *IoCInvokeStructure_rawClone(IoCInvokeStructure *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoCInvokeStructureData))); IoObject_setSlot_to_(self, IOSYMBOL("memberTypes"), IoMap_new(IOSTATE)); return self; }
IoCertificate *IoCertificate_rawClone(IoCertificate *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, CERTIFICATE(proto)); //need to do more work for the copy to be correct return self; }
IoDate *IoDate_rawClone(IoDate *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, Date_new()); Date_copy_(DATA(self), DATA(proto)); return self; }
IoDBI *IoDBI_rawClone(IoDBI *proto) { IoDBI *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoDBIData))); DATA(self)->driverCount = 0; return self; }
IoCairoSurfacePattern *IoCairoSurfacePattern_rawClone(IoCairoSurfacePattern *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); if (PATTERN(proto)) IoObject_setDataPointer_(self, cairo_pattern_reference(PATTERN(proto))); return self; }
IoRegex *IoRegex_rawClone(IoRegex *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoRegexData))); DATA(self)->pattern = IOREF(DATA(proto)->pattern); return self; }
IoZlibEncoder *IoZlibEncoder_rawClone(IoZlibEncoder *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoZlibEncoderData))); DATA(self)->strm = calloc(1, sizeof(z_stream)); return self; }
IoCairoLinearGradient *IoCairoLinearGradient_rawClone(IoCairoLinearGradient *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); if (PATTERN(proto)) IoObject_setDataPointer_(self, cairo_pattern_reference(PATTERN(proto))); return self; }
IoYajlGen *IoYajlGen_rawClone(IoYajlGen *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); yajl_gen_config config = { 0, "" }; IoObject_setDataPointer_(self, yajl_gen_alloc(&config, NULL)); return self; }
IoCairoFontFace *IoCairoFontFace_rawClone(IoCairoFontFace *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); if (FACE(proto)) IoObject_setDataPointer_(self, cairo_font_face_reference(FACE(proto))); return self; }
IoCairoSVGSurface *IoCairoSVGSurface_rawClone(IoCairoSVGSurface *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); if (SURFACE(proto)) IoObject_setDataPointer_(self, cairo_surface_reference(SURFACE(proto))); return self; }
IoNumber *IoRandom_rawClone(IoRandom *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, RandomGen_new()); RandomGen_chooseRandomSeed(DATA(self)); return self; }
IoODEMass *IoODEMass_rawClone(IoODEMass *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoODEMassData))); memcpy(DATA(self), DATA(proto), sizeof(IoODEMassData)); return self; }
IoCall *IoCall_rawClone(IoCall *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, cpalloc(IoObject_dataPointer(proto), sizeof(IoCallData))); //printf("IoCall_rawClone() %p|%p\n", (void *)self, IoObject_dataPointer(self)); IoCall_initSlots(self); return self; }
IoCFFIPointer *IoCFFIPointer_rawClone(IoCFFIPointer *proto) { IoObject *self = IoObject_rawClonePrimitive(proto); IoObject_setDataPointer_(self, calloc(1, sizeof(IoCFFIPointerData))); memset(DATA(self), 0, sizeof(IoCFFIPointerData)); DATA(self)->valuePointer = &(DATA(self)->ptr); return self; }