MCPcopy Create free account
hub / github.com/cpputest/cpputest / convertFunctionPointerToLongValue

Function convertFunctionPointerToLongValue

src/CppUTest/SimpleString.cpp:753–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

751}
752
753static long convertFunctionPointerToLongValue(void (*value)())
754{
755 /*
756 * This way of converting also can convert a 64bit pointer in a 32bit integer by truncating.
757 * This isn't the right way to convert pointers values and need to change by implementing a
758 * proper portable way to convert pointers to strings.
759 */
760 long* long_value = (long*) &value;
761 return *long_value;
762}
763
764SimpleString StringFrom(cpputest_longlong)
765{

Callers 1

HexStringFromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected