View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000161 | LDMud | Efuns | public | 2004-11-26 19:46 | 2020-01-09 00:22 |
| Reporter | Assigned To | Gnomi | |||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | fixed | ||
| Summary | 0000161: read_bytes(), write_bytes() shloud also accept int* | ||||
| Description | Short: read_bytes()/write_bytes() should handle 0x0 as well Date: 981208 Type: Feature State: Unclassified From: coogan read_bytes()/write_bytes() should use int* instead of/in addition to strings so that they can handle 0x0 bytes as well. | ||||
| Tags | No tags attached. | ||||
| External Data (URL) | |||||
|
|
...in order to be able to read and write \0 bytes? Right, I forgot to list this point. The tricky part is read_bytes(): if you want it to return embedded 0-bytes, it must return an int*. So this means either a special parameter combination to tell read_bytes() to switch into binary mode, or the return type of read_bytes() is permanently changed from string to int*. Personally, I'd prefer the latter solution, even though it requires a simul-efun to stay compatible with existing mudlibs. |
|
|
Since LDMud 3.3 strings can have \0 in them without any problems. With LDMud 3.6 both efuns work on byte sequences which is even less problematic. |