mbeddr.core icon indicating copy to clipboard operation
mbeddr.core copied to clipboard

sizeof operator should return size_t

Open stephaneberle9 opened this issue 11 years ago • 2 comments

... but not uint32

stephaneberle9 avatar Jul 03 '13 11:07 stephaneberle9

see updateTask_run() in HelloDisplayImpl see testFlashErase() in FlashCommandTests

stephaneberle9 avatar Jul 03 '13 11:07 stephaneberle9

That is a bit tricky.

we need to change the typeing rule of sizeof and type it to size_t. this means as well that we introduce a supertype of size_t which is the one configured in the TSC. however this is not possible in 2.5 because of missing api.

The idea is to have only one TypeSizeConfig per workspace.

This TSC can be found "by name" (moduleName/modelName).

Finding a module in 3.0 works as follows: SRepository.getModules()

The API then must be similar to

SModelDescriptor javaLangJavaStubModelDescriptor = SModelRepository.getInstance().getModelDescriptor(SModelReference.fromString("java.lang@java_stub")); assert javaLangJavaStubModelDescriptor != null; SModel javaLang = javaLangJavaStubModelDescriptor.getSModel(); node<> stringClass = SModelOperations.getRootByName(javaLang, "String");

bkolb avatar Jul 03 '13 12:07 bkolb