The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
noahzh

被 cgo 的 union 折磨的不要不要的

  •  1
     
  •   noahzh · Mar 1, 2023 · 2576 views
    This topic created in 1345 days ago, the information mentioned may be changed or developed.
    typedef struct tagVARIANT {
    	 union 
    	{
    		 struct
    		{
    			VARTYPE vt;
    			 union
    			{
    				int64_t llVal;
    				int32_t lVal;
    				int16_t iVal;
    				int8_t bVal;
    				float fltVal;
    				double dblVal;
    				double date;
    				char* cstrVal;
    				short* bstrVal;
    				void* pyref;
    				int8_t* pbVal;
    				int16_t* piVal;
    				int32_t* plVal;
    				int64_t* pllVal;
    				float* pfltVal;
    				double* pdblVal;
    				double* pdate;
    				char** pcstrVal;
    				short** pbstrVal;
    				SAFEARRAY* parray;
    				VARIANT* pvarVal;
    			} __VARIANT_NAME_3;
    		} __VARIANT_NAME_2;
    	} __VARIANT_NAME_1;
    } tagVARIANT;
    

    cgo 处理 union 太痛苦了,大家有什么好的解决办法吗?谢谢。

    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4542 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 09:35 · PVG 17:35 · LAX 01:35 · JFK 04:35
    ♥ Do have faith in what you're doing.