MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / gen_emodify

Function gen_emodify

src/gpre/obj_cxx.cpp:1938–1972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1936//
1937
1938static void gen_emodify( const act* action, int column)
1939{
1940 TEXT s1[MAX_REF_SIZE], s2[MAX_REF_SIZE];
1941
1942 const upd* modify = (upd*) action->act_object;
1943
1944 for (const ref* reference = modify->upd_port->por_references; reference;
1945 reference = reference->ref_next)
1946 {
1947 const ref* source = reference->ref_source;
1948 if (!source)
1949 continue;
1950 const gpre_fld* field = reference->ref_field;
1951 align(column);
1952 gen_name(s1, source, true);
1953 gen_name(s2, reference, true);
1954 if (field->fld_dtype > dtype_cstring || (field->fld_sub_type == 1 && field->fld_length == 1))
1955 {
1956 fprintf(gpreGlob.out_file, "%s = %s;", s2, s1);
1957 }
1958 else if (gpreGlob.sw_cstring && !field->fld_sub_type)
1959 fprintf(gpreGlob.out_file, isLangCpp(gpreGlob.sw_language) ?
1960 "isc_vtov ((const char*) %s, (char*) %s, %d);" :
1961 "isc_vtov ((char*) %s, (char*) %s, %d);",
1962 s1, s2, field->fld_length);
1963 else
1964 fprintf(gpreGlob.out_file, "isc_ftof (%s, %d, %s, %d);",
1965 s1, field->fld_length, s2, field->fld_length);
1966 if (field->fld_array_info)
1967 gen_get_or_put_slice(action, reference, false, column);
1968 }
1969
1970 gen_send(action, modify->upd_port, column);
1971
1972}
1973
1974
1975//____________________________________________________________

Callers 1

OBJ_CXX_actionFunction · 0.70

Calls 5

isLangCppFunction · 0.85
alignFunction · 0.70
gen_nameFunction · 0.70
gen_get_or_put_sliceFunction · 0.70
gen_sendFunction · 0.70

Tested by

no test coverage detected