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

Function convertPointerToLongValue

src/CppUTest/SimpleString.cpp:742–751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

740#else /* CPPUTEST_USE_LONG_LONG */
741
742static long convertPointerToLongValue(const void* value)
743{
744 /*
745 * This way of converting also can convert a 64bit pointer in a 32bit integer by truncating.
746 * This isn't the right way to convert pointers values and need to change by implementing a
747 * proper portable way to convert pointers to strings.
748 */
749 long* long_value = (long*) &value;
750 return *long_value;
751}
752
753static long convertFunctionPointerToLongValue(void (*value)())
754{

Callers 1

HexStringFromFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected