mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fixes #255 ("Typos in Boost 1.87 documentation")
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
[def BOOST_INTERPROCESS_CATCH_END]
|
||||
|
||||
[def test::get_process_id_name() "MyName"]
|
||||
[def argv[2] "MyName"]
|
||||
[def test::get_argv_2(argv) "MyName"]
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ int main (int argc, char *argv[])
|
||||
}
|
||||
else{
|
||||
//Open managed segment
|
||||
managed_shared_memory segment(open_only, argv[2]);
|
||||
managed_shared_memory segment(open_only, test::get_argv_2(argv));
|
||||
|
||||
//An handle from the base address can identify any byte of the shared
|
||||
//memory segment even if it is mapped in different base addresses
|
||||
|
||||
@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else{
|
||||
//Open managed shared memory
|
||||
managed_shared_memory segment(open_only, argv[2]);
|
||||
managed_shared_memory segment(open_only, test::get_argv_2(argv));
|
||||
|
||||
std::pair<MyType*, managed_shared_memory::size_type> res;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else{
|
||||
//Open already created shared memory object.
|
||||
shared_memory_object shm (open_only, argv[2], read_only);
|
||||
shared_memory_object shm (open_only, test::get_argv_2(argv), read_only);
|
||||
|
||||
//Map the whole shared memory in this process
|
||||
mapped_region region(shm, read_only);
|
||||
|
||||
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else{ //Child process
|
||||
//Open the managed segment
|
||||
managed_shared_memory segment(open_only, argv[2]);
|
||||
managed_shared_memory segment(open_only, test::get_argv_2(argv));
|
||||
|
||||
//Find the vector using the c-string name
|
||||
MyVector *myvector = segment.find<MyVector>("MyVector").first;
|
||||
|
||||
@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else{
|
||||
//Open already created shared memory object.
|
||||
windows_shared_memory shm (open_only, argv[2], read_only);
|
||||
windows_shared_memory shm (open_only, test::get_argv_2(argv), read_only);
|
||||
|
||||
//Map the whole shared memory in this process
|
||||
mapped_region region(shm, read_only);
|
||||
|
||||
@@ -129,6 +129,13 @@ inline std::wstring get_wfilename()
|
||||
|
||||
#endif
|
||||
|
||||
namespace test {
|
||||
|
||||
inline const char *get_argv_2(char *argv[])
|
||||
{ return argv[2]; }
|
||||
|
||||
} //namespace test {
|
||||
|
||||
} //namespace interprocess{
|
||||
} //namespace boost{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user