<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi all:<br>In fact both C and Modula-3 don't allow a signature change, original C compiler and decompiler type check the signature, although type casting is possible in both languages:<br>http://web.cs.mun.ca/~ulf/pld/mocplus.html<br><br>However, when talking about a functional language you can override as in Baby Modula-3 the type at instantiation time for methods and values, so I guess you can sort of relax the strict rules in that relation of the two object function types (to make it a subtype):<br>http://www.hpl.hp.com/techreports/Compaq-DEC/SRC-RR-95.pdf<br><br>see p. 10 - S. 3.2.4 - Discussion<br><br>I just know they could make it work, but it was very hard complex system.<br><br>Thanks in advance<br><br><br>--- El <b>sáb, 14/7/12, Jay K <i><jay.krell@cornell.edu></i></b> escribió:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255);
margin-left: 5px; padding-left: 5px;"><br>De: Jay K <jay.krell@cornell.edu><br>Asunto: [M3devel] fcntl last parameter int vs. pointer<br>Para: "m3devel" <m3devel@elegosoft.com><br>Fecha: sábado, 14 de julio, 2012 03:27<br><br><div class="plainMail"><br>Thoughts on<br><br>Unix__fcntl(int fd, int request, int arg)<br>{<br> return fcntl(fd, request, arg);<br>}<br><br>vs.<br><br>Unix__fcntl(int fd, int request, INTEGER arg)<br>{<br><br> return fcntl(fd, request, arg);<br><br>}<br><br><br><br>where int is 32bits and INTEGER is exactly the same size as a pointer.<br><br><br>Will it "just work" if I change it?<br>arg is sometimes a pointer, sometimes an integer, maybe sometimes other?<br>Ok, let's assume 32bit integer and 32bit or 64bit pointer are the only possibilities.<br>Are there calling conventions that care? And will pass the parameter differently/wrong?<br><br><br>Do any calling conventions pack multiple smaller-than-64bit parameters
into one 64bit register?<br><br><br>I'm *guessing* no.<br>I guess, as well, I can experiment with a few...<br><br><br><br> - Jay<br> </div></blockquote></td></tr></table>