<div dir="ltr"><div>Hi Eliot,</div><div>IMO no C code should assume that char is signed nor unsigned...</div><div>If socket plugin assumes unsigned, shouldn't it better use unsigned char* explicitelitely?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 23 déc. 2020 à 01:33, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2907.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2907.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-eem.2907<br>
Author: eem<br>
Time: 22 December 2020, 4:32:46.670664 pm<br>
UUID: 5bf10ff3-9f29-4f07-b93a-91354783cb32<br>
Ancestors: VMMaker.oscog-tpr.2906<br>
<br>
Simulation:<br>
Fix regression in SocketPluginSimulator due to changes to CArray>>coerceTo:sim: in VMMaker.oscog-eem.2905; 'char *' is assumed to be unsigned.<br>
Add a missing Socket primitive simulation (hit when running the SocketTests under simulation).<br>
Add a useful error message to CLiteralArray>>at:put:<br>
<br>
=============== Diff against VMMaker.oscog-tpr.2906 ===============<br>
<br>
Item was changed:<br>
  ----- Method: CArray>>coerceTo:sim: (in category 'converting') -----<br>
  coerceTo: cTypeString sim: interpreterSimulator<br>
<br>
        ^cTypeString caseOf: {<br>
                ['int']                         -> [self ptrAddress].<br>
                ['float *']                     -> [self asSingleFloatAccessor].<br>
                ['double *']                    -> [self asDoubleFloatAccessor].<br>
                ['sqInt *']                     -> [self shallowCopy unitSize: interpreter bytesPerOop; beSigned].<br>
                ['unsigned int *']      -> [self shallowCopy unitSize: 4; beUnsigned].<br>
                ['int *']                               -> [self shallowCopy unitSize: 4; beSigned].<br>
                ['unsigned short *']    -> [self shallowCopy unitSize: 2; beUnsigned].<br>
                ['short *']                     -> [self shallowCopy unitSize: 2; beSigned].<br>
                ['unsigned char *']     -> [self shallowCopy unitSize: 1; beUnsigned].<br>
+               ['char *']                      -> [self shallowCopy unitSize: 1; beUnsigned]. "C is ambivalent on the issue; sigh... SocketPlugin assumes unsigned"<br>
-               ['char *']                      -> [self shallowCopy unitSize: 1; beSigned]. "C is ambivalent on the issue; sigh..."<br>
                ['unsigned']            -> [self ptrAddress].<br>
                ['sqInt']                               -> [self ptrAddress].<br>
                ['usqInt']                      -> [self ptrAddress].<br>
                ['sqIntptr_t']          -> [self shallowCopy unitSize: interpreter bytesPerOop; yourself] }!<br>
<br>
Item was changed:<br>
  ----- Method: CLiteralArray>>at:put: (in category 'accessing') -----<br>
  at: offset put: val<br>
+       self error: 'Literals are immutable; proceed to attempt to assign anyway...'.<br>
        ^object at: offset + 1 put: val!<br>
<br>
Item was added:<br>
+ ----- Method: SocketPluginSimulator>>sqSocket:ListenOnPort:BacklogSize: (in category 'simulation') -----<br>
+ sqSocket: socketHandle ListenOnPort: portNumber BacklogSize: backlog<br>
+       ^[Socket basicNew<br>
+                       primSocket: ((self hostSocketHandleFromSimSocketHandle: socketHandle) ifNil: [^self])<br>
+                       listenOn: portNumber<br>
+                       backlogSize: backlog]<br>
+               on: SocketPrimitiveFailed<br>
+               do: [:ex|<br>
+                       interpreterProxy primitiveFail.<br>
+                       0]!<br>
<br>
</blockquote></div>