comparison src/if_lua.c @ 30310:029c59bf78f1 v9.0.0491

patch 9.0.0491: no good reason to build without the float feature Commit: https://github.com/vim/vim/commit/73e28dcc6125f616cf1f2d56443d22428a79e434 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 17 21:08:33 2022 +0100 patch 9.0.0491: no good reason to build without the float feature Problem: No good reason to build without the float feature. Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
author Bram Moolenaar <Bram@vim.org>
date Sat, 17 Sep 2022 22:15:05 +0200
parents 89e1d67814a9
children 684e6dfa2fba
comparison
equal deleted inserted replaced
30309:4ba3d27b5357 30310:029c59bf78f1
557 ? "" : (char *)tv->vval.v_string); 557 ? "" : (char *)tv->vval.v_string);
558 break; 558 break;
559 case VAR_NUMBER: 559 case VAR_NUMBER:
560 lua_pushinteger(L, (int) tv->vval.v_number); 560 lua_pushinteger(L, (int) tv->vval.v_number);
561 break; 561 break;
562 #ifdef FEAT_FLOAT
563 case VAR_FLOAT: 562 case VAR_FLOAT:
564 lua_pushnumber(L, (lua_Number) tv->vval.v_float); 563 lua_pushnumber(L, (lua_Number) tv->vval.v_float);
565 break; 564 break;
566 #endif
567 case VAR_LIST: 565 case VAR_LIST:
568 luaV_pushlist(L, tv->vval.v_list); 566 luaV_pushlist(L, tv->vval.v_list);
569 break; 567 break;
570 case VAR_DICT: 568 case VAR_DICT:
571 luaV_pushdict(L, tv->vval.v_dict); 569 luaV_pushdict(L, tv->vval.v_dict);
617 case LUA_TSTRING: 615 case LUA_TSTRING:
618 tv->v_type = VAR_STRING; 616 tv->v_type = VAR_STRING;
619 tv->vval.v_string = vim_strsave((char_u *) lua_tostring(L, pos)); 617 tv->vval.v_string = vim_strsave((char_u *) lua_tostring(L, pos));
620 break; 618 break;
621 case LUA_TNUMBER: 619 case LUA_TNUMBER:
622 #ifdef FEAT_FLOAT
623 { 620 {
624 const lua_Number n = lua_tonumber(L, pos); 621 const lua_Number n = lua_tonumber(L, pos);
625 622
626 if (n > (lua_Number)INT64_MAX || n < (lua_Number)INT64_MIN 623 if (n > (lua_Number)INT64_MAX || n < (lua_Number)INT64_MIN
627 || ((lua_Number)((varnumber_T)n)) != n) 624 || ((lua_Number)((varnumber_T)n)) != n)
633 { 630 {
634 tv->v_type = VAR_NUMBER; 631 tv->v_type = VAR_NUMBER;
635 tv->vval.v_number = (varnumber_T)n; 632 tv->vval.v_number = (varnumber_T)n;
636 } 633 }
637 } 634 }
638 #else
639 tv->v_type = VAR_NUMBER;
640 tv->vval.v_number = (varnumber_T) lua_tointeger(L, pos);
641 #endif
642 break; 635 break;
643 case LUA_TFUNCTION: 636 case LUA_TFUNCTION:
644 { 637 {
645 char_u *name; 638 char_u *name;
646 luaV_CFuncState *state; 639 luaV_CFuncState *state;