예제 #1
0
JNIEXPORT void JNICALL
Java_zconfig__1_1set_name (JNIEnv *env, jclass c, jlong self, jstring name)
{
    char *name_ = (char *) (*env)->GetStringUTFChars (env, name, NULL);
    zconfig_set_name ((zconfig_t *) self, name_);
    (*env)->ReleaseStringUTFChars (env, name, name_);
}
예제 #2
0
파일: zconfig.c 프로젝트: Prarrot/czmq
zconfig_t *
zconfig_new (char *name, zconfig_t *parent)
{
    zconfig_t *self = (zconfig_t *) zmalloc (sizeof (zconfig_t));
    zconfig_set_name (self, name);
    if (parent) {
        if (parent->child) {
            //  Attach as last child of parent
            zconfig_t *last = parent->child;
            while (last->next)
                last = last->next;
            last->next = self;
        }
        else
            //  Attach as first child of parent
            parent->child = self;
    }
    self->parent = parent;
    return self;
}
예제 #3
0
///
//  Set config item name, name may be NULL
void QmlZconfig::setName (const QString &name) {
    zconfig_set_name (self, name.toUtf8().data());
};