You are not logged in.
Pages: 1
i have created this record
TUsuarioRecuperaSenha = packed record
UserPass: RawByteString;
end;
...
TUsuarioService = class(TServiceBase, IUsuarioService)
function TrocaSenha(const pUsuario: TUsuarioTrocaSenha) : TServiceCustomAnswer;
...
GetApp.RegisterService(TUsuarioService, [TypeInfo(IUsuarioService)]);
GetApp.Put('/usuariotrocasenha', 'usuarioService/trocasenha');
I got erro on this part of mormot
constructor TInterfaceFactory.Create(aInterface: PRttiInfo);
...
imvRecord:
if ArgRtti.Size <= POINTERBYTES then <<<<<<<<<<<<<<<<<<< shouldnt be "if ArgRtti.Size < POINTERBYTES then" ??????????
raise EInterfaceFactory.CreateUtf8(
'%.Create: % record too small in %.% method % parameter: it ' +
'should be at least % bytes (i.e. a pointer) to be on stack',
[self, ArgTypeName^, fInterfaceName, URI, ParamName^, POINTERBYTES]);
If i put more fields on record it works
Offline
In fact, the comparison is correct, but the error message is misleading/incorrect.
The value is expected to be on the stack, so it is required to be MORE than SizeOf(pointer).
This is an ABI limitation.
I have corrected the error message:
https://github.com/synopse/mORMot2/commit/847051f1
Offline
Pages: 1