Short: modified stringp()
From: Tatu P Saloranta <doomdark@cc.hut.fi>
Date: Fri, 18 Dec 1998 14:47:26 +0200 (EET)
Type: Feature
State: Acknowledged
I just compiled LDMud, and noticed there were actually few other efuns
I had hacked into Amylaar GD... Some aren't probably useful for anyone
else out there, but others might be. Although I don't want to add yet
another dozen of esoteric efuns to GD, I think it'd be good to discuss
about possible useful new additions anyway. So, here's my list:
- Modifications to stringp(), to make stringp() return 0 if the
  argument is not a string (normal), otherwise the address of the
  string. This was used in my Java-client to pass 'references'
  to items instead of strings; the references needed to be unique
  on the server side and address was the simplest such thing I could
  think of. Might not be very useful in general, but on the other hand
  it's a really small change to code:
    CASE(F_STRINGP);
    {
	int i;
	
	if (sp->type == T_STRING) {
		i = (int) sp->u.string;
	} else i = 0;
	free_svalue(sp);
	put_number(i);
	break;
    }
This can be extended to the other xxxp() predicates.