このページを編集する際は、[[編集に関する方針]]に従ってください。 *概要 [#ec8700a1] -対象:8.1.4 -言語:C -宣言:[[postgresql-8.1.4/src/include/lib/stringinfo.h]](extern) -定義:[[postgresql-8.1.4/src/backend/lib/stringinfo.c]] -(概要を書いてください。) *引数 [#k20bda3a] -StringInfo str -- *実装 [#f9c632c4] void initStringInfo(StringInfo str) -[[StringInfo/postgresql-8.1.4]] -- 下記メンバを持つ構造体へのポインタ型 --char型へのポインタdata --int型の変数len --int型の変数maxlen --int型の変数cursor { int size = 256; /* initial default buffer size */ str->data = (char *) palloc(size); -[[palloc()/postgresql-8.1.4]] -- グローバル変数 [[CurrentMemoryContext/postgresql-8.1.4]] 配下の関数ポインタ CurrentMemoryContext->methods->alloc で指定されている関数をコールして、戻り値を返す。 -[[palloc()/postgresql-8.1.4]] -- %%グローバル変数 [[CurrentMemoryContext/postgresql-8.1.4]] 配下の関数ポインタ CurrentMemoryContext->methods->alloc で指定されている関数をコールして、戻り値を返す。%% --引数 sz が[[MaxAllocSize/postgresql-8.1.4]]より大きければ、[[elog()/postgresql-8.1.4]]を再帰呼び出しする。 --(USE_ASSERT_CHECKINGを指定したバイナリの場合)assert_enabledが0以外、かつ、 ポインタCurrentMemoryContextを構造体[[Node/postgresql-8.1.4]]型のポインタにキャストしたときにtypeメンバに相当する値がT_AllocSetContextでない時、エラー情報を出力してプログラムを停止する。 str->maxlen = size; str->len = 0; str->data[0] = '\0'; str->cursor = 0; } *呼出元 [#s7d5c1c6] -[[expand_fmt_string()/postgresql-8.1.4]] *備考 [#q3e3a39c] -解読を一旦中止([[関数ポインタ①/解読日記]]を参照) /* * initStringInfo * * Initialize a StringInfoData struct (with previously undefined contents) * to describe an empty string. */ *履歴 [#f0021cd6] -作者:[[testnoda/ページ作者]] -日付:????/?/? |更新日|更新者|更新内容| |2007/4/24|[[testnoda/ページ作者]]|解読を一旦中止([[関数ポインタ①/解読日記]]を参照)| |||| *コメント [#e32ef25c] #comment