• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ discard_const函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中discard_const函数的典型用法代码示例。如果您正苦于以下问题:C++ discard_const函数的具体用法?C++ discard_const怎么用?C++ discard_const使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了discard_const函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: spnego_free_data

bool spnego_free_data(struct spnego_data *spnego)
{
	bool ret = true;

	if (!spnego) goto out;

	switch(spnego->type) {
	case SPNEGO_NEG_TOKEN_INIT:
		if (spnego->negTokenInit.mechTypes) {
			talloc_free(discard_const(spnego->negTokenInit.mechTypes));
		}
		data_blob_free(&spnego->negTokenInit.reqFlags);
		data_blob_free(&spnego->negTokenInit.mechToken);
		data_blob_free(&spnego->negTokenInit.mechListMIC);
		talloc_free(spnego->negTokenInit.targetPrincipal);
		break;
	case SPNEGO_NEG_TOKEN_TARG:
		if (spnego->negTokenTarg.supportedMech) {
			talloc_free(discard_const(spnego->negTokenTarg.supportedMech));
		}
		data_blob_free(&spnego->negTokenTarg.responseToken);
		data_blob_free(&spnego->negTokenTarg.mechListMIC);
		break;
	default:
		ret = false;
		break;
	}
	ZERO_STRUCTP(spnego);
out:
	return ret;
}
开发者ID:AIdrifter,项目名称:samba,代码行数:31,代码来源:spnego_parse.c


示例2: free_scsi_device

static void free_scsi_device(struct scsi_device *sdev)
{
	if (sdev->error_str) {
		free(discard_const(sdev->error_str));
		sdev->error_str = NULL;
	}
	if (sdev->iscsi_url) {
		free(discard_const(sdev->iscsi_url));
		sdev->iscsi_url = NULL;
	}
	if (sdev->iscsi_ctx) {
		iscsi_logout_sync(sdev->iscsi_ctx);
		iscsi_destroy_context(sdev->iscsi_ctx);
		sdev->iscsi_ctx = NULL;
	}

	if (sdev->sgio_dev) {
		free(discard_const(sdev->sgio_dev));
		sdev->sgio_dev = NULL;
	}
	if (sdev->sgio_fd != -1) {
		close(sdev->sgio_fd);
		sdev->sgio_fd = -1;
	}
	free(sdev);
}
开发者ID:rcsheets,项目名称:libiscsi,代码行数:26,代码来源:iscsi-test-cu.c


示例3: START_TEST

END_TEST

START_TEST(test_group_both_set)
{
    struct tevent_req *req;

    test_ctx->ctx->allow_groups = discard_const(ulist_1);
    test_ctx->ctx->deny_groups = discard_const(ulist_1);

    req = simple_access_check_send(test_ctx, test_ctx->ev,
                                   test_ctx->ctx, "u1");
    fail_unless(test_ctx != NULL, "Cannot create request\n");
    tevent_req_set_callback(req, simple_access_check_done, test_ctx);

    test_loop(test_ctx);
    test_ctx->done = false;

    fail_unless(test_ctx->error == EOK, "access_simple_check failed.");
    fail_unless(test_ctx->access_granted == false,
                "Access granted while user is in deny list.");

    req = simple_access_check_send(test_ctx, test_ctx->ev,
                                   test_ctx->ctx, "u3");
    fail_unless(test_ctx != NULL, "Cannot create request\n");
    tevent_req_set_callback(req, simple_access_check_done, test_ctx);

    test_loop(test_ctx);

    fail_unless(test_ctx->error == EOK, "access_simple_check failed.");
    fail_unless(test_ctx->access_granted == false,
                "Access granted while user is not in allow list.");
}
开发者ID:abbra,项目名称:sssd,代码行数:32,代码来源:simple_access-tests.c


示例4: opt_test_inherit

void opt_test_inherit(void **state)
{
    struct dp_option *opts = talloc_get_type(*state, struct dp_option);
    int ret;
    struct dp_option *opts_copy;
    const char *s;
    const char *sd_inherit_match[] = { "string_nodefault",
                                       "blob_nodefault",
                                       "int_nodefault",
                                       "bool_true",
                                       NULL };

    ret = dp_copy_defaults(opts, test_def_opts,
                           OPT_NUM_OPTS, &opts_copy);
    assert_int_equal(ret, EOK);
    assert_defaults(opts);

    dp_option_inherit(NULL, OPT_STRING_NODEFAULT,
                      opts, opts_copy);
    s = dp_opt_get_string(opts_copy, OPT_STRING_NODEFAULT);
    assert_null(s);

    /* string */
    assert_nondefault_string_empty(opts_copy);
    set_nondefault_string(opts);
    dp_option_inherit(discard_const(sd_inherit_match),
                      OPT_STRING_NODEFAULT,
                      opts, opts_copy);
    check_nondefault_string(opts_copy);

    /* blob */
    assert_nondefault_blob_empty(opts_copy);
    set_nondefault_blob(opts);
    dp_option_inherit(discard_const(sd_inherit_match),
                      OPT_BLOB_NODEFAULT,
                      opts, opts_copy);
    check_nondefault_blob(opts_copy);

    /* number */
    assert_nondefault_int_notset(opts_copy);
    set_nondefault_int(opts);
    dp_option_inherit(discard_const(sd_inherit_match),
                      OPT_INT_NODEFAULT,
                      opts, opts_copy);
    assert_nondefault_int_set(opts_copy);

    /* bool */
    assert_true(dp_opt_get_bool(opts_copy, OPT_BOOL_TRUE));

    ret = dp_opt_set_bool(opts, OPT_BOOL_TRUE, false);
    assert_int_equal(ret, EOK);

    dp_option_inherit(discard_const(sd_inherit_match),
                      OPT_BOOL_TRUE,
                      opts, opts_copy);

    assert_false(dp_opt_get_bool(opts_copy, OPT_BOOL_TRUE));
}
开发者ID:3van,项目名称:sssd,代码行数:58,代码来源:test_dp_opts.c


示例5: get_uncompressed_size

/* returns the size of the uncompressed file, or 0 if it could not be
 * determined.
 */
static off_t get_uncompressed_size(const char *path)
{
        struct ecm *ecm;
        size_t pos;
        TDB_DATA key, data;

        LOG("GET_UNCOMPRESSED_SIZE [%s]\n", path);

        key.dptr = discard_const(path);
        key.dsize = strlen(path);
        data = tdb_fetch(filesize_tdb, key);
        if (data.dptr) {
                off_t size = *(off_t *)data.dptr;
                free(data.dptr);
                return size;
        }

        LOG("GET_UNCOMPRESSED_SIZE SLOW PATH [%s]\n", path);

        ecm = ecm_open_file(dir_fd, path);
        if (ecm == NULL) {
                LOG("Failed to open ECM file %s in get_uncompressed_size\n",
                    path);
                return 0;
        }
        pos = ecm_get_file_size(ecm);
        ecm_close_file(ecm);
        LOG("GET_UNCOMPRESSED_SIZE [%s] %zu\n", path, pos);

        data.dptr = (uint8_t *)&pos;
        data.dsize = sizeof(pos);
        tdb_store(filesize_tdb, key, data, TDB_REPLACE);

        return pos;
}
开发者ID:sahlberg,项目名称:fuse-unecm,代码行数:38,代码来源:fuse-unecm.c


示例6: ipa_sudo_conv_store

static errno_t
ipa_sudo_conv_store(hash_table_t *table,
                    const char *key,
                    void *value)
{
    hash_key_t hkey;
    hash_value_t hvalue;
    int hret;

    if (table == NULL || key == NULL) {
        return EINVAL;
    }

    hkey.type = HASH_KEY_STRING;
    hkey.str = discard_const(key);

    /* If value is NULL we don't want to override existing entry. */
    if (value == NULL && hash_has_key(table, &hkey)) {
        return EEXIST;
    }

    hvalue.type = HASH_VALUE_PTR;
    hvalue.ptr = value;

    hret = hash_enter(table, &hkey, &hvalue);
    if (hret != HASH_SUCCESS) {
        return EIO;
    }

    if (value != NULL) {
        talloc_steal(table, value);
    }

    return EOK;
}
开发者ID:3van,项目名称:sssd,代码行数:35,代码来源:ipa_sudo_conversion.c


示例7: dyndns_test_error

void dyndns_test_error(void **state)
{
    struct tevent_req *req;
    errno_t ret;
    TALLOC_CTX *tmp_ctx;

    tmp_ctx = talloc_new(global_talloc_context);
    assert_non_null(tmp_ctx);
    check_leaks_push(tmp_ctx);

    dyndns_test_ctx->state = MOCK_NSUPDATE_ERR;

    req = be_nsupdate_send(tmp_ctx, dyndns_test_ctx->tctx->ev,
                           BE_NSUPDATE_AUTH_GSS_TSIG,
                           discard_const("test message"), false);
    assert_non_null(req);
    tevent_req_set_callback(req, dyndns_test_done, dyndns_test_ctx);

    /* Wait until the test finishes with EIO (child error) */
    ret = test_ev_loop(dyndns_test_ctx->tctx);
    DEBUG(SSSDBG_TRACE_LIBS,
          "Child request returned [%d]: %s\n", ret, strerror(ret));
    assert_int_equal(ret, ERR_DYNDNS_FAILED);

    assert_true(WIFEXITED(dyndns_test_ctx->child_status));
    assert_int_equal(WEXITSTATUS(dyndns_test_ctx->child_status), 1);

    assert_true(check_leaks_pop(tmp_ctx) == true);
    talloc_free(tmp_ctx);
}
开发者ID:mmsrubar,项目名称:thesis,代码行数:30,代码来源:test_dyndns.c


示例8: fetch_lock_once

/*
	Just try locking/unlocking a single record once
*/
static void fetch_lock_once(struct ctdb_context *ctdb, struct event_context *ev)
{
	TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
	TDB_DATA key, data;
	struct ctdb_record_handle *h;
	static time_t t = 0, t2;

	key.dptr = discard_const(TESTKEY);
	key.dsize = strlen(TESTKEY);

//	printf("Trying to fetch lock the record ...\n");

	h = ctdb_fetch_readonly_lock(ctdb_db, tmp_ctx, key, &data, true);
	if (h == NULL) {
		printf("Failed to fetch record '%s' on node %d\n", 
	       		(const char *)key.dptr, ctdb_get_pnn(ctdb));
		talloc_free(tmp_ctx);
		exit(10);
	}

	count++;
	t2 = time(NULL);
	if (t != 0 && t != t2) {
		static int last_count = 0;

		printf("count : %d\n", count - last_count);
		last_count = count;
	}
	t = t2;

	talloc_free(tmp_ctx);
}
开发者ID:AIdrifter,项目名称:samba,代码行数:35,代码来源:ctdb_fetch_readonly_loop.c


示例9: do_test1

static void do_test1(void)
{
	struct hash_count_context *hc = NULL;
	TALLOC_CTX *mem_ctx = talloc_new(NULL);
	struct timeval interval = {1, 0};
	TDB_DATA key;
	int count = 0;
	int ret, i;

	key.dptr = (uint8_t *)discard_const(KEY);
	key.dsize = strlen(KEY);

	ret = hash_count_increment(hc, key);
	assert(ret == EINVAL);

	ret = hash_count_init(mem_ctx, interval, NULL, NULL, &hc);
	assert(ret == EINVAL);

	ret = hash_count_init(mem_ctx, interval, test1_handler, &count, &hc);
	assert(ret == 0);
	assert(hc != NULL);

	for (i=0; i<10; i++) {
		ret = hash_count_increment(hc, key);
		assert(ret == 0);
		assert(count == i+1);
	}

	talloc_free(hc);
	ret = talloc_get_size(mem_ctx);
	assert(ret == 0);

	talloc_free(mem_ctx);
}
开发者ID:Alexander--,项目名称:samba,代码行数:34,代码来源:hash_count_test.c


示例10: START_TEST

END_TEST

START_TEST(test_case_sensitive)
{
    char *result;
    int ret;
    const char *file_template = BASE"_%u";
    const char *expected_cs = BASE"_TestUser";
    const char *expected_ci = BASE"_testuser";

    kr->pd->user = discard_const("TestUser");
    ret = dp_opt_set_string(kr->krb5_ctx->opts, KRB5_CCACHEDIR, CCACHE_DIR);
    fail_unless(ret == EOK, "Failed to set Ccache dir");

    result = expand_ccname_template(tmp_ctx, kr, file_template, NULL, true, true);

    fail_unless(result != NULL, "Cannot expand template [%s].", file_template);
    fail_unless(strcmp(result, expected_cs) == 0,
                "Expansion failed, result [%s], expected [%s].",
                result, expected_cs);

    result = expand_ccname_template(tmp_ctx, kr, file_template, NULL, true, false);

    fail_unless(result != NULL, "Cannot expand template [%s].", file_template);
    fail_unless(strcmp(result, expected_ci) == 0,
                "Expansion failed, result [%s], expected [%s].",
                result, expected_ci);
}
开发者ID:abbra,项目名称:sssd,代码行数:28,代码来源:krb5_utils-tests.c


示例11: mprSetPtrChild

/*
  set a pointer in a existing MprVar, freeing it when the property goes away
*/
void mprSetPtrChild(struct MprVar *v, const char *propname, const void *p)
{
	mprSetVar(v, propname, mprCreatePtrVar(discard_const(p)));
	v = mprGetProperty(v, propname, NULL);
	v->allocatedData = 1;
	talloc_steal(mprMemCtx(), p);
}
开发者ID:Marvin-Lee,项目名称:libwmiclient,代码行数:10,代码来源:mprutil.c


示例12: setup_talloc_context

END_TEST


void setup_talloc_context(void)
{
    int ret;
    int i;

    struct pam_data *pd;
    struct krb5_ctx *krb5_ctx;
    fail_unless(tmp_ctx == NULL, "Talloc context already initialized.");
    tmp_ctx = talloc_new(NULL);
    fail_unless(tmp_ctx != NULL, "Cannot create talloc context.");

    kr = talloc_zero(tmp_ctx, struct krb5child_req);
    fail_unless(kr != NULL, "Cannot create krb5child_req structure.");

    pd = create_pam_data(tmp_ctx);
    fail_unless(pd != NULL, "Cannot create pam_data structure.");

    krb5_ctx = talloc_zero(tmp_ctx, struct krb5_ctx);
    fail_unless(pd != NULL, "Cannot create krb5_ctx structure.");

    pd->user = discard_const(USERNAME);
    kr->uid = atoi(UID);
    kr->upn = discard_const(PRINCIPAL_NAME);
    pd->cli_pid = atoi(PID);

    krb5_ctx->opts = talloc_zero_array(tmp_ctx, struct dp_option, KRB5_OPTS);
    fail_unless(krb5_ctx->opts != NULL, "Cannot created options.");
    for (i = 0; i < KRB5_OPTS; i++) {
        krb5_ctx->opts[i].opt_name = default_krb5_opts[i].opt_name;
        krb5_ctx->opts[i].type = default_krb5_opts[i].type;
        krb5_ctx->opts[i].def_val = default_krb5_opts[i].def_val;
    }
    ret = dp_opt_set_string(krb5_ctx->opts, KRB5_REALM, REALM);
    fail_unless(ret == EOK, "Failed to set Realm");
    ret = dp_opt_set_string(krb5_ctx->opts, KRB5_CCACHEDIR, CCACHE_DIR);
    fail_unless(ret == EOK, "Failed to set Ccache dir");

    kr->homedir = HOME_DIRECTORY;

    kr->pd = pd;
    kr->krb5_ctx = krb5_ctx;

}
开发者ID:abbra,项目名称:sssd,代码行数:46,代码来源:krb5_utils-tests.c


示例13: iscsi_free_discovery_addresses

static void
iscsi_free_discovery_addresses(struct iscsi_context *iscsi, struct iscsi_discovery_address *addresses)
{
	while (addresses != NULL) {
		struct iscsi_discovery_address *next = addresses->next;

		iscsi_free(iscsi, discard_const(addresses->target_name));
		addresses->target_name = NULL;

		iscsi_free(iscsi, discard_const(addresses->target_address));
		addresses->target_address = NULL;

		addresses->next = NULL;
		iscsi_free(iscsi, addresses);
		addresses = next;
	}
}
开发者ID:bosal,项目名称:libiscsi,代码行数:17,代码来源:discovery.c


示例14: wbsrv_samba3_priv_pipe_dir

NTSTATUS wbsrv_samba3_priv_pipe_dir(struct wbsrv_samba3_call *s3call)
{
	const char *path = s3call->wbconn->listen_socket->service->priv_socket_path;
	s3call->response.result		 = WINBINDD_OK;
	s3call->response.extra_data.data = discard_const(path);

	s3call->response.length += strlen(path) + 1;
	return NT_STATUS_OK;
}
开发者ID:0x24bin,项目名称:winexe-1,代码行数:9,代码来源:wb_samba3_cmd.c


示例15: START_TEST

END_TEST

START_TEST(test_parse_args)
{
    struct pa_testcase {
        const char *argstr;
        const char **parsed;
    };

    TALLOC_CTX *test_ctx;
    int i, ii;
    int ret;
    char **parsed;
    char **only_ret;
    char **only_exp;
    char **both;

    test_ctx = talloc_new(NULL);

    /* Positive tests */
    const char *parsed1[] = { "foo", NULL };
    const char *parsed2[] = { "foo", "a", NULL };
    const char *parsed3[] = { "foo", "b", NULL };
    const char *parsed4[] = { "foo", "a c", NULL };
    const char *parsed5[] = { "foo", "a", "d", NULL };
    const char *parsed6[] = { "foo", "a", "e", NULL };
    const char *parsed7[] = { "foo", "a", "f", NULL };
    const char *parsed8[] = { "foo", "a\tg", NULL };
    struct pa_testcase tc[] = {
        { "foo", parsed1 },
        { "foo a", parsed2 },
        { "foo  b", parsed3 },
        { "foo a\\ c", parsed4 },
        { "foo a d ", parsed5 },
        { "foo   a   e   ", parsed6 },
        { "foo	a	 	f 	", parsed7 },
        { "foo a\\\tg", parsed8 },
        { NULL, NULL }
    };

    for (i=0; tc[i].argstr != NULL; i++) {
        parsed = parse_args(tc[i].argstr);
        fail_if(parsed == NULL && tc[i].parsed != NULL,
                "Could not parse correct argument string '%s'\n");

        ret = diff_string_lists(test_ctx, parsed, discard_const(tc[i].parsed),
                                &only_ret, &only_exp, &both);
        fail_unless(ret == EOK, "diff_string_lists returned error [%d]", ret);
        fail_unless(only_ret[0] == NULL, "The parser returned more data than expected\n");
        fail_unless(only_exp[0] == NULL, "The parser returned less data than expected\n");

        for (ii = 0; parsed[ii]; ii++) free(parsed[ii]);
        free(parsed);
    }

    talloc_free(test_ctx);
}
开发者ID:PallaviKumariJha,项目名称:SSSD,代码行数:57,代码来源:util-tests.c


示例16: iscsi_destroy_context

int iscsi_destroy_context(struct iscsi_context *iscsi)
{
    struct iscsi_pdu *pdu;

    if (iscsi == NULL) {
        return 0;
    }
    if (iscsi->initiator_name != NULL) {
        free(discard_const(iscsi->initiator_name));
        iscsi->initiator_name = NULL;
    }
    if (iscsi->alias != NULL) {
        free(discard_const(iscsi->alias));
        iscsi->alias = NULL;
    }
    if (iscsi->is_loggedin != 0) {
        printf("deswtroying context while logged in\n");
    }
    if (iscsi->fd != -1) {
        iscsi_disconnect(iscsi);
    }

    if (iscsi->inbuf != NULL) {
        free(iscsi->inbuf);
        iscsi->inbuf = NULL;
        iscsi->insize = 0;
        iscsi->inpos = 0;
    }

    while ((pdu = iscsi->outqueue)) {
        DLIST_REMOVE(iscsi->outqueue, pdu);
        pdu->callback(iscsi, ISCSI_STATUS_CANCELLED, NULL, pdu->private_data);
        iscsi_free_pdu(iscsi, pdu);
    }
    while ((pdu = iscsi->waitpdu)) {
        DLIST_REMOVE(iscsi->waitpdu, pdu);
        pdu->callback(iscsi, ISCSI_STATUS_CANCELLED, NULL, pdu->private_data);
        iscsi_free_pdu(iscsi, pdu);
    }

    free(iscsi);

    return 0;
}
开发者ID:dooglus,项目名称:ccan,代码行数:44,代码来源:init.c


示例17: fuse_nfs_write

static int fuse_nfs_write(const char *path, const char *buf, size_t size,
       off_t offset, struct fuse_file_info *fi)
{
	int ret = 0;
	struct nfsfh *nfsfh = (struct nfsfh *)fi->fh;

	ret = nfs_pwrite(nfs, nfsfh, offset, size, discard_const(buf));

	return ret;
}
开发者ID:MaxKellermann,项目名称:libnfs,代码行数:10,代码来源:fuse_nfs.c


示例18: fetch_lock_once

/*
	Just try locking/unlocking a single record once
*/
static void fetch_lock_once(struct ctdb_context *ctdb, struct event_context *ev, uint32_t generation)
{
	TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
	TDB_DATA key, data;
	struct ctdb_record_handle *h;
	struct ctdb_ltdb_header *header;
	int ret;

	key.dptr = discard_const(TESTKEY);
	key.dsize = strlen(TESTKEY);

	printf("Trying to fetch lock the record ...\n");

	h = ctdb_fetch_readonly_lock(ctdb_db, tmp_ctx, key, &data, false);
	if (h == NULL) {
		printf("Failed to fetch record '%s' on node %d\n", 
	       		(const char *)key.dptr, ctdb_get_pnn(ctdb));
		talloc_free(tmp_ctx);
		exit(10);
	}

	printf("Record fetchlocked.\n");
	header = talloc_memdup(tmp_ctx, ctdb_header_from_record_handle(h), sizeof(*header));
       	printf("RSN:%d\n", (int)header->rsn);
	talloc_free(h);
	printf("Record released.\n");

	printf("Write new record with RSN+10\n");
	header->rsn += 10;
	data.dptr = (void *)talloc_asprintf(tmp_ctx, "%d", (int)header->rsn);
	data.dsize = strlen((char *)data.dptr);

	ret = ctdb_ctrl_updaterecord(ctdb, ctdb, timeval_zero(), CTDB_CURRENT_NODE, ctdb_db, key, header, data);
	if (ret != 0) {
		printf("Failed to writerecord,  ret==%d\n", ret);	
		exit(1);
	}

	printf("re-fetch the record\n");
	h = ctdb_fetch_lock(ctdb_db, tmp_ctx, key, &data);
	if (h == NULL) {
		printf("Failed to fetch record '%s' on node %d\n", 
	       		(const char *)key.dptr, ctdb_get_pnn(ctdb));
		talloc_free(tmp_ctx);
		exit(10);
	}

	printf("Record fetchlocked.\n");
	header = talloc_memdup(tmp_ctx, ctdb_header_from_record_handle(h), sizeof(*header));
       	printf("RSN:%d\n", (int)header->rsn);
	talloc_free(h);
	printf("Record released.\n");

	talloc_free(tmp_ctx);
}
开发者ID:AIdrifter,项目名称:samba,代码行数:58,代码来源:ctdb_update_record.c


示例19: START_TEST

END_TEST

START_TEST(test_both_set)
{
    int ret;
    bool access_granted = false;

    ctx->allow_users = discard_const(ulist_1);
    ctx->deny_users = discard_const(ulist_1);

    ret = simple_access_check(ctx, "u1", &access_granted);
    fail_unless(ret == EOK, "access_simple_check failed.");
    fail_unless(access_granted == false, "Access granted "
                                         "while user is in deny list.");

    ret = simple_access_check(ctx, "u3", &access_granted);
    fail_unless(ret == EOK, "access_simple_check failed.");
    fail_unless(access_granted == false, "Access granted "
                                        "while user is not in allow list.");
}
开发者ID:scaria,项目名称:sssd,代码行数:20,代码来源:simple_access-tests.c


示例20: test_create

static bool test_create(struct torture_context *tctx, 
			const void *tcase_data, 
			const void *test_data)
{
	struct share_context *ctx = discard_const(tcase_data);
	int count;
	const char **names;
	int i;
	bool found = false;
	struct share_info inf[] = { 
		{ SHARE_INFO_STRING, SHARE_TYPE, discard_const_p(void *, "IPC$") },
开发者ID:technosaurus,项目名称:samba4-GPL2,代码行数:11,代码来源:share.c



注:本文中的discard_const函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ discard_event函数代码示例发布时间:2022-05-30
下一篇:
C++ discard_cache函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap