1
我正在轉換C api> Java,並且我有以下函數原型。爲通過參數返回的函數創建一個類型圖
/*
Retrieves an individual field value from the current Line
\param reader pointer to Text Reader object.
\param field_num relative field [aka column] index: first field has index 0.
\param type on completion this variable will contain the value type.
\param value on completion this variable will contain the current field value.
\return 0 on failure: any other value on success.
*/
extern int gaiaTextReaderFetchField (gaiaTextReaderPtr reader, int field_num, int *type, const char **value);
我想獲得返回的狀態不如預期,返回「類型」爲int和「價值」作爲字符串(不被釋放)
從技術文檔我發現你創建一些可以保留返回值的結構。
請問有人能幫我做第一個嗎?
嗨@Flexo, 我纔剛剛返回這最近和我有gaiaTextReaderPtr結構的另一個問題。我希望也許你能再次幫助我,這是另一個難題。我爲此創建了一個單獨的問題: http://stackoverflow.com/questions/14132617/create-a-typemap-for-a-function-part-2 – Hank