RE: Porting SimpleHTTPServer to CW/C++
RE: Porting SimpleHTTPServer to CW/C++
- Subject: RE: Porting SimpleHTTPServer to CW/C++
- From: Joe Kelly <email@hidden>
- Date: Fri, 14 Jun 2002 13:44:46 -0700
If you want to supply methods of a C++ class as some kind of system
callback, you should a) make them 'static' (you probably knew that already
:-), and b) make sure they match the designated calling convention ie: in
this case declare your methods as 'pascal'.
j
-> -----Original Message-----
-> From: Terence Goggin [
mailto:email@hidden]
-> Sent: Friday, June 14, 2002 12:31 AM
-> To: email@hidden;
-> email@hidden
-> Subject: Porting SimpleHTTPServer to CW/C++
->
->
-> Hi all,
->
-> While porting some code (based on Quinn's SimpleHTTPServer) to
-> CodeWarrior/C++, I got 3 errors, all related to threads and
-> UPPs.
->
-> I suspect that they're related to my inclusion of some of the
-> HTTPServer functions as methods of a class, but this is just a
-> guess.
->
-> Has anyone ever had to deal with these before? If so, can you
-> help shed some light on this? I doubt I've got the experience
-> to know what to do next. (I've pasted the error text below,
-> if that helps.)
->
-> Thanks (as always!)
->
-> Terence
->
-> -------------------------------------------------------
->
-> Error : illegal explicit conversion from 'void' to
-> 'pascal void * (*)(void *)'
-> ASNetwork.cp line 758 rocUPP =
-> (ThreadEntryUPP)NewThreadEntryUPP((ThreadEntryProcPtr)WorkerT
-> hreadProc);
->
-> Error : illegal explicit conversion from 'void' to
-> 'pascal void * (*)(void *)'
-> ASNetwork.cp line 881 ProcUPP =
-> (ThreadEntryUPP)NewThreadEntryUPP((ThreadEntryProcPtr)
-> HTTPServerProc);
->
-> Error : illegal explicit conversion from 'void' to
-> 'pascal void (*)(void *, unsigned long, long, void *)'
-> ASNetwork.cp line 965 gYieldingNotifierUPP =
-> NewOTNotifyUPP((OTNotifyProcPtr)YieldingNotifier);
-> _______________________________________________
-> macnetworkprog mailing list | email@hidden
-> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.