Esempio n. 1
0
JNIEXPORT void JNICALL
Java_net_sourceforge_zbar_Image_destroy (JNIEnv *env,
                                         jobject obj,
                                         jlong peer)
{
    zbar_image_ref(PEER_CAST(peer), -1);
    stats.Image_destroy++;
}
Esempio n. 2
0
zbarImage*
zbarImage_FromImage (zbar_image_t *zimg)
{
    zbarImage *self = PyObject_GC_New(zbarImage, &zbarImage_Type);
    if(!self)
        return(NULL);
    zbar_image_ref(zimg, 1);
    zbar_image_set_userdata(zimg, self);
    self->zimg = zimg;
    self->data = NULL;
    return(self);
}