Example #1
0
void main()
{
	//func (std::string("asd"), std::wstring(L"def"));
	func_ref (std::string("asd"), std::wstring(L"def"));
	func_ref (std::string("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore"),
		std::wstring(L"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore"));
	uint32_t c=1;
	uint64_t d=2;
	func2 (std::string("old str"), std::wstring(L"old widestr"), &c, &d);
};
Example #2
0
File: main.cpp Project: CCJY/coliru
int main() {
    int a;
    int* b = &a;
    int** c = &b;
    int*** d = &c;

    func_ptr(b);
    func_ptr(*c);
    func_ptr(**d);

    func_ref(*b);
    func_ref(**c);
    func_ref(***d);
}
Example #3
0
    void
do_pyeval (char_u *str, typval_T *rettv)
{
    DoPyCommand((char *) str,
	    (rangeinitializer) init_range_eval,
	    (runner) run_eval,
	    (void *) rettv);
    switch(rettv->v_type)
    {
	case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
	case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
	case VAR_FUNC: func_ref(rettv->vval.v_string);    break;
	case VAR_PARTIAL: ++rettv->vval.v_partial->pt_refcount; break;
	case VAR_UNKNOWN:
	    rettv->v_type = VAR_NUMBER;
	    rettv->vval.v_number = 0;
	    break;
	case VAR_NUMBER:
	case VAR_STRING:
	case VAR_FLOAT:
	case VAR_SPECIAL:
	case VAR_JOB:
	case VAR_CHANNEL:
	    break;
    }
}
Example #4
0
    void
do_pyeval (char_u *str, typval_T *rettv)
{
    DoPythonCommand(NULL, (char *) str, rettv);
    switch(rettv->v_type)
    {
	case VAR_DICT: ++rettv->vval.v_dict->dv_refcount; break;
	case VAR_LIST: ++rettv->vval.v_list->lv_refcount; break;
	case VAR_FUNC: func_ref(rettv->vval.v_string);    break;
	case VAR_UNKNOWN:
	    rettv->v_type = VAR_NUMBER;
	    rettv->vval.v_number = 0;
	    break;
    }
}
Example #5
0
void
do_py3eval (char_u *str, typval_T *rettv)
{
	DoPyCommand((char *) str,
				(rangeinitializer) init_range_eval,
				(runner) run_eval,
				(void *) rettv);
	switch(rettv->v_type) {
	case VAR_DICT:
		++rettv->vval.v_dict->dv_refcount;
		break;
	case VAR_LIST:
		++rettv->vval.v_list->lv_refcount;
		break;
	case VAR_FUNC:
		func_ref(rettv->vval.v_string);
		break;
	case VAR_UNKNOWN:
		rettv->v_type = VAR_NUMBER;
		rettv->vval.v_number = 0;
		break;
	}
}