>It was a question of me as a _user_ of the public librt API.

The reason I commented (in jest) was because ever since the lists were created, 
they've been documented as:

brlcad-devel: Developer discussions, patch submissions, coding questions, and 
more
brlcad-users: User discussions, suggestions, (non-coding) questions, and 
comments

More info on the lists page at http://sourceforge.net/mail/?group_id=105292

The setup was intentionally more aligned to be code/non-code more than 
internal/external since as an open source project, the idea of being an 
"external" user can (as has just been demonstrated) be very vague and arguable 
based on the topic.  So the lists are aligned across categories of content, not 
categories of participants.

>Yes, it works :-)))

Excellent!

>But why does it work?  db_create_inmem() creates a read-only database.
> Writing to it should not be allowed.  Or, how can I make this
>read-only database writable (i.e. in memory)?

If I recall correctly, the dbi_read_only flag only applies to a database 
instance's ability to be written to disk.  So in-memory database instances are 
inherently "read only" since they should never end up calling db_write.  I 
believe dbi_read_only is set to true merely as a "just in case" sanity measure.

It works because in-memory operations happen before file operations.  The 
dbi_read_only check only prevents the latter from occurring.  Additionally, for 
your specific example, nothing has been written to the inmem dbip yet besides 
the ident header which bypasses read-only checks since it's a very low-level 
preparation activity anyways.

To make any read-only database instance a writable instance, you merely set the 
dbi_read_only flag to false.  I can't think of a reason that in-memory 
databases couldn't have dbi_read_only be set to false by default, but it 
wouldn't/shouldn't change anything.

Cheers!
Sean



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to